Skip to content

Commit

Permalink
Headings must now start with A-Z or 0-9.
Browse files Browse the repository at this point in the history
The match was made so that they could actually start with spaces (since headings can contain spaces). This would match XATTR_SHOWCOMPRESSION in removexattr(2).


git-svn-id: http://svn.textmate.org/trunk/Support@11997 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
  • Loading branch information
sorbits committed Jan 8, 2011
1 parent 523edb6 commit 63c3144
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/man2html
Expand Up @@ -32,7 +32,7 @@ page.gsub!(/&/, '&')
page.gsub!(/</, '&lt;')
page.gsub!(/``(.*?)''/, '‘‘\1’’')
page.gsub!(/`([^`\n]*?)'/, '‘\1’')
page.gsub!(/\n*^([A-Z0-9_\- ]+)$\n/) { toc << $1; "</pre>\n<h2 id='#$1'>#{$1.capitalize}</h2>\n<pre>" }
page.gsub!(/\n*^([A-Z0-9][A-Z0-9_\- ]+)$\n/) { toc << $1; "</pre>\n<h2 id='#$1'>#{$1.capitalize}</h2>\n<pre>" }
page.gsub!(/\b([a-z0-9_.\-]+)\((\d)\)/) { see_also << [ $1, $2 ]; "<a href='javascript:man(#$2, &quot;#$1&quot;)'>#$1</a>(#$2)" }

STDOUT << "<div style=\"position: fixed; top: 0; left: 0; height: 3em; background-color: #eef; width: 100%; z-index: 100\">\n"
Expand Down

0 comments on commit 63c3144

Please sign in to comment.