Permalink
Browse files

added Python support

  • Loading branch information...
1 parent a080eed commit 727ba51522ab0677afb1fc661325e8f9ed9f880e @andrewschaaf andrewschaaf committed Oct 25, 2010
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/docco.coffee
View
@@ -129,6 +129,8 @@ languages =
name: 'javascript', symbol: '//'
'.rb':
name: 'ruby', symbol: '#'
+ '.py':
+ name: 'python', symbol: '#'
# Build out the appropriate matchers and delimiters for each language.
for ext, l of languages
@@ -142,7 +144,8 @@ for ext, l of languages
# The mirror of `divider_text` that we expect Pygments to return. We can split
# on this to recover the original sections.
- l.divider_html = new RegExp('\\n*<span class="c1">' + l.symbol + 'DIVIDER<\\/span>\\n*')
+ # Note: the class is "c" for Python and "c1" for the other languages
+ l.divider_html = new RegExp('\\n*<span class="c1?">' + l.symbol + 'DIVIDER<\\/span>\\n*')
# Get the current language we're documenting, based on the extension.
get_language = (source) -> languages[path.extname(source)]

0 comments on commit 727ba51

Please sign in to comment.