如果您有在部落格文章中貼上程式碼的需求,除了可以參考SyntaxHighlighter來設定外

另外也可以藉由 Format My Source Code 這個網站的幫忙,來產生出已經格式化好的程式碼哦!

使用方式如下:

1. 開啟 Format My Source Code 網頁: http://formatmysourcecode.blogspot.tw/

2. 在上方的空格內貼入要寫在文章中的程式碼後,並按下Format Text按鈕

  我們以HelloWorld來示範,如下圖紅色框框圈選處所示:

3. 複製他幫我們產生的HTML程式碼(上圖綠色框框圈選處),並回到文章中的原始碼區塊貼上後即可~!

轉換過的程式碼就會呈現為下面樣子囉~

 

public class HelloWorld {
    public static void main(String[] args) {
        System.out.println("Hello! World!");
    }
}

 

介紹給各位參考!! (其實是自己怕忘記)

參考資料來源:
1. http://formatmysourcecode.blogspot.tw/

 

arrow
arrow
    文章標籤
    Blog Tools
    全站熱搜
    創作者介紹
    創作者 allen0818 的頭像
    allen0818

    allen0818 的部落格

    allen0818 發表在 痞客邦 留言(0) 人氣()