Skip to content

Commit

Permalink
Docco 0.9.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jashkenas committed Nov 16, 2021
1 parent 10dcf60 commit dc63bdf
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
8 changes: 6 additions & 2 deletions docco.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docco.litcoffee
Original file line number Diff line number Diff line change
Expand Up @@ -181,14 +181,14 @@ if not specified.
lang or= language.name
if highlightjs.getLanguage(lang)
highlightjs.highlight(lang, code).value
highlightjs.highlight(code, {language: lang}).value
else
console.warn "docco: couldn't highlight code block with unknown language '#{lang}' in #{source}"
code
}
for section, i in sections
code = highlightjs.highlight(language.name, section.codeText).value
code = highlightjs.highlight(section.codeText, {language: language.name}).value
code = code.replace(/\s+$/, '')
section.codeHtml = "<div class='highlight'><pre>#{code}</pre></div>"
section.docsHtml = marked(section.docsText)
Expand Down
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -221,14 +221,14 @@ <h2 id="main-documentation-generation-functions">Main Documentation Generation F
lang <span class="hljs-keyword">or</span>= language.name

<span class="hljs-keyword">if</span> highlightjs.getLanguage(lang)
highlightjs.highlight(lang, code).value
highlightjs.highlight(code, {language: lang}).value
<span class="hljs-keyword">else</span>
console.warn <span class="hljs-string">&quot;docco: couldn&#x27;t highlight code block with unknown language &#x27;<span class="hljs-subst">#{lang}</span>&#x27; in <span class="hljs-subst">#{source}</span>&quot;</span>
code
}

<span class="hljs-keyword">for</span> section, i <span class="hljs-keyword">in</span> sections
code = highlightjs.highlight(language.name, section.codeText).value
code = highlightjs.highlight(section.codeText, {language: language.name}).value
code = code.replace(<span class="hljs-regexp">/\s+$/</span>, <span class="hljs-string">&#x27;&#x27;</span>)
section.codeHtml = <span class="hljs-string">&quot;&lt;div class=&#x27;highlight&#x27;&gt;&lt;pre&gt;<span class="hljs-subst">#{code}</span>&lt;/pre&gt;&lt;/div&gt;&quot;</span>
section.docsHtml = marked(section.docsText)</pre></div>
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"coffeescript"
],
"author": "Jeremy Ashkenas",
"version": "0.9.0",
"version": "0.9.1",
"license": "MIT",
"repository": {
"type": "git",
Expand Down

0 comments on commit dc63bdf

Please sign in to comment.