2010-04-10 2 views

답변

1

편집자의 독립, 당신은 단순히 루비 syntax 보석을 사용할 수 있습니다. 여기에 당신이 찾고있는 기능을 보여주는 사용자 가이드,의 발췌입니다

require 'syntax/convertors/html' 

convertor = Syntax::Convertors::HTML.for_syntax "ruby" 
html = convertor.convert(File.read("program.rb")) 

puts html 
3

사용하여 HTML로 코드를 수출 지원합니다.

code2html file.c > code.html 
+2

주를 복제 : "공식적인"버전은'와 HTML을 생성하는' 이제는 더 이상 사용되지 않는 태그들. 대신 CSS를 생성하는 자체 버전을 사용합니다. 이 패치 된 CSS 지원 버전은 내 웹 사이트 (http://www.field-theory.org/software/index.html#code2html – user8472

+0

)에 래퍼로 ​​다운로드 할 수 있습니다. http://ysgitdiary.blogspot.fi/2012 /07/code2html-sh-wrapper-for-create-folder.html –

0

Textmate도 할 수 있습니다. TextMate 번들의 "문서에서 HTML 만들기"를 참조하십시오.

1

highlight_file PHP 전용 솔루션이지만 빠르다.

<?php highlight_file("somefile.php"); // basic usage 
highlight_file(__FILE__); 
$out = highlight_file("file.php") // string variable, can be written to file etc. 
?> 

기타 - 시도해 보셨습니까? GeSHi?