diff options
| author | Kevin Fischer <[email protected]> | 2020-12-18 15:31:10 +0900 |
|---|---|---|
| committer | Amir Rajan <[email protected]> | 2021-01-05 22:45:01 -0600 |
| commit | ce4b2aeea3ba79d2f3c2282cdaaed12bfbbf6cc9 (patch) | |
| tree | 5f4ec5ad1ca48b2d12a73a2920a3028465a64e29 /dragon/docs.rb | |
| parent | 169b8c90cc49457922db82d8716b7eb82bbbe2e4 (diff) | |
| download | dragonruby-game-toolkit-contrib-ce4b2aeea3ba79d2f3c2282cdaaed12bfbbf6cc9.tar.gz dragonruby-game-toolkit-contrib-ce4b2aeea3ba79d2f3c2282cdaaed12bfbbf6cc9.zip | |
Add prism for syntax highlighting
Diffstat (limited to 'dragon/docs.rb')
| -rw-r--r-- | dragon/docs.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/dragon/docs.rb b/dragon/docs.rb index fd1c6c9..148eda8 100644 --- a/dragon/docs.rb +++ b/dragon/docs.rb @@ -257,6 +257,8 @@ S <head> <title>DragonRuby Game Toolkit Documentation</title> <link href="docs.css?ver=#{Time.now.to_i}" rel="stylesheet" type="text/css" media="all"> + <link href="prism.css?ver=#{Time.now.to_i}" rel="stylesheet" type="text/css" media="all"> + <script src="prism.js?ver=#{Time.now.to_i}"></script> </head> <body> <div id='toc'> @@ -442,13 +444,13 @@ S inside_ol = false inside_ul = false inside_pre = true - content_html << "<pre>" + content_html << '<pre><code class="language-ruby">' elsif l.start_with? "#+end_src" parse_log << "- PRE end detected." inside_ol = false inside_ul = false inside_pre = false - content_html << "</pre>\n" + content_html << "</code></pre>\n" elsif l.start_with? "#+begin_quote" parse_log << "- BLOCKQUOTE start detected." content_html += close_list_if_needed.call inside_ul, inside_ol |
