Merge remote branch 'mikewest/master'
This commit is contained in:
commit
6266408828
@ -85,7 +85,7 @@ class Rocco
|
||||
}
|
||||
@options = defaults.merge(options)
|
||||
@sources = sources
|
||||
@comment_pattern = Regexp.new("^\\s*#{@options[:comment_chars]}")
|
||||
@comment_pattern = Regexp.new("^\\s*#{@options[:comment_chars]}\s?")
|
||||
@sections = highlight(split(parse(@data)))
|
||||
end
|
||||
|
||||
@ -176,7 +176,7 @@ class Rocco
|
||||
# Do some post-processing on the pygments output to split things back
|
||||
# into sections and remove partial `<pre>` blocks.
|
||||
code_html = code_html.
|
||||
split(/\n*<span class="c.">#{@options[:comment_chars]} DIVIDER<\/span>\n*/m).
|
||||
split(/\n*<span class="c.?">#{@options[:comment_chars]} DIVIDER<\/span>\n*/m).
|
||||
map { |code| code.sub(/\n?<div class="highlight"><pre>/m, '') }.
|
||||
map { |code| code.sub(/\n?<\/pre><\/div>\n/m, '') }
|
||||
|
||||
|
@ -31,8 +31,8 @@
|
||||
{{#sections}}
|
||||
<tr id='section-{{ num }}'>
|
||||
<td class=docs>
|
||||
<div class="octowrap">
|
||||
<a class="octothorpe" href="#section-{{ num }}">#</a>
|
||||
<div class="pilwrap">
|
||||
<a class="pilcrow" href="#section-{{ num }}">¶</a>
|
||||
</div>
|
||||
{{{ docs }}}
|
||||
</td>
|
||||
|
Loading…
Reference in New Issue
Block a user