블로그/웹에서 소스코드 하이라이트(highlight) / 구문강조
***** 참고 사이트 : https://github.com/idleberg/Paraiso-Google-Code-Prettify
-> 다른것 : javascript 문구 테스트 - SyntaxHighlighter를 이용 , SyntaxHighlighter
아래 스크립트 태그를 삽입해주세요.
<SCRIPT src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></SCRIPT>
사용하기
<pre>, <code>, <xmp> 의 class 요소에 prettyprint 를 넣어주면 됩니다.
<pre class="prettyprint">
class Voila {
public:
// Voila
static const string VOILA = "Voila";
// will not interfere with embedded <a href="#voila2">tags</a>.
}
</pre>
class Voila {
public:
// Voila
static const string VOILA = "Voila";
// will not interfere with embedded tags.
}
SELECT * FROM table_name LIMIT 10;
Many
lines
of
code
Paraíso for Google Code Prettify
A color scheme inspired by the colorful illustrations by Brazilian artist Rubens LP.
This theme is also available for Atom, BBEdit, CodeMirror, Eclipse, Geany, Gedit, highlight.js, IntelliJ IDEA, iTerm2, Mou, Notepad++, Prism.js, Pygments, Rainbow, Sublime Text, Xcode and more!
Installation
- Setup Google Code Prettify
- Download a
.css
file of choice
- Replace
prettify.js
with the downloaded file