dp.SyntaxHighlighter

| | Comments (2) | TrackBacks (0)

블로깅 하다보면, 코드를 적어야 하는 경우가 자주 발생하고, 하이라이팅을 하기 위한 편리한 방법이 필요합니다.

하이라이팅을 위해 HTML로 변환하는 툴이야 많지만, 중요한 requirement들은 다음과 같습니다.

  1. Presentation의 분리: 코드 텍스트를 (가능한 한) 원래의 형태로 저장할 것.
  2. XHTML 표준의 사용:  예를 들어, <font /> element 보다는 <span /> element, class attribute, CSS를 활용할 것.

Presentation 분리는 대체로 Textile과 같은 formatter를 따로 사용해서 얻을 수 있는데, 블로깅 툴들이 기본적으로 제공하는 경우는 없고, 글 전체에 특정 format을 사용해야하기 때문에 맘에 안듭니다. 조그만 악을 해치우기 위해 더 큰 악을 불러들여오는 꼴이랄까요. 그리고 아쉽게도 기존의 툴들은 대부분 <font /> element를 사용하는 경우가 많습니다.

겐도사마를 통해 알게 된 dp.SyntaxHighlighter를 사용해보았습니다. dp.SyntaxHighlighter의 장점은 코드 텍스트를 그대로 유지하면서, javascript와 CSS를 통해 하이라이팅을 하기 때문에 위의 requirement들을 모두 만족한다고 볼 수 있습니다.

0 TrackBacks

Listed below are links to blogs that reference this entry: dp.SyntaxHighlighter.

TrackBack URL for this entry: http://lastmind.net/mt/mt-tb.cgi/371

아... 오래 전부터 쓰고 있었는데, 제 블로그에선 못 보셨나봐요. RSS로 구독하시면 안 보일테니...^^

그랬군요... 피드로만 읽다보니... ^^;

Leave a comment

About this Entry

This page contains a single entry by Joseph Jang published on March 9, 2007 8:19 AM.

JRuby 0.9.8 Problem with Non-ASCII Characters was the previous entry in this blog.

My Career Experiences and Goals is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Powered by Movable Type 4.21-en