Permalink
Browse files

The function highlight has changed considerably, with support for url…

… references across sections, and plain text code output. Update the documentation to reflect this.
  • Loading branch information...
1 parent e3c71ae commit 47590f52e1b9b3620b58f5f85cbe3a89b6604294 @justindujardin justindujardin committed Oct 31, 2012
Showing with 10 additions and 7 deletions.
  1. +10 −7 src/docco.coffee
View
@@ -2,7 +2,8 @@
# documentation generator. It produces HTML
# that displays your comments alongside your code. Comments are passed through
# [Markdown](http://daringfireball.net/projects/markdown/syntax), and code is
-# passed through [Pygments](http://pygments.org/) syntax highlighting.
+# passed through [Pygments](http://pygments.org/) syntax highlighting, if it
+# is present on the system.
# This page is the result of running Docco against its own source file.
#
# If you install Docco, you can run it from the command-line:
@@ -96,13 +97,15 @@ parse = (source, code) ->
save docsText, codeText
sections
-# Highlights a single chunk of CoffeeScript code, using **Pygments** over stdio,
-# and runs the text of its corresponding comment through **Markdown**, using
-# [Showdown.js](http://attacklab.net/showdown/).
+# Highlights parsed sections of code, using **Pygments** over stdio,
+# and runs the text of their corresponding comments through **Markdown**, using
+# [Showdown.js](http://attacklab.net/showdown/). If Pygments is not present
+# on the system, output the code in plain text.
#
-# We process the entire file in single calls to Pygments and Showdown by inserting
-# little marker comments between each section and then splitting the result string
-# wherever our markers occur.
+#
+# We process all sections with single calls to Pygments and Showdown, by
+# inserting marker comments between each section and then splitting the result
+# string wherever the marker occurs.
highlight = (source, sections, callback) ->
language = getLanguage source
pygments = spawn 'pygmentize', [

0 comments on commit 47590f5

Please sign in to comment.