일기

문법 강조 적용했다

koc/SALM 2009. 11. 10. 20:23

조커(ZocKr) 님의 블로그 BLUEnLIVE's ZocKrWorld를 참조하여 Google Syntax Highlighter(문법 강조)를 적용하였습니다.

적용 예시

  • 배치파일 : [ code bat]내용</code>
[code bat; highlight: (6, 9, 13)] @ECHO OFF REM 1부터 10까지의 합을 구하는 배치파일 SETLOCAL SET SUM=0 SET SUMTEMP=0 FOR /L %%i IN (1,1,10) DO CALL :COUNT GOTO :EOF   :COUNT SET /A SUMTEMP=%SUMTEMP%+1 SET /A SUM=%SUM%+%SUMTEMP% ECHO 0부터 %SUMTEMP%까지의 합은 %SUM%입니다. GOTO :EOF [/code]
  • C 언어 : <code class="brush:cpp;">내용</code>
[code cpp] int main () { // 1부터 10까지의 합을 구하는 C 언어 소스코드     int i, sum;     for (i=1, sum=0; i<=10; i++) {         sum = sum + i;         printf ("\d\n", sum);     }     return (0); } [/code]
  • HTML & 티스토리 치환자 : <code class="brush:html;">내용</code> 그리고 치환자는 [## 사이에 \를 집어넣었습니다.(조커 님의 팁 참조)
[code html; stripBrs;] <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>[\##_title_##] :: [\##_page_title_##]</title> <link href="./style.css" rel="stylesheet" type="text/css" /> [/code]

참조 문서

이 글은 스프링노트에서 작성되었습니다.