remove previously NMTOKEN sanitizer (no longer needed), fix javascript XML compliance and compatibility, add boilerplate headlin to 'children' tag

This commit is contained in:
Jörn Nettingsmeier 2014-02-03 18:08:12 +01:00
parent 435b1075fa
commit 1c9b22500d

View File

@ -131,7 +131,13 @@ module Manual
"<li><a href='#{child[:url]}'>#{child[:title]}</a></li>"
end.uniq
"<ul>#{entries.join}</ul>"
"<div class='chapter_content'>
<p>This chapter covers:</p>
<ul>
#{entries.join}
</ul>
</div>
"
end
end
end
@ -165,10 +171,6 @@ module Manual
position ? [current, position, level + 1] : [current]
end
# def sanitize_NMTOKEN(s)
# 'ID'+s.gsub(/[^0-9A-z:_.-]/, '_')
# end
def render(context)
@source = '_manual' #context.registers[:site].source
@ -239,13 +241,15 @@ module Manual
end
"<dl>#{tree.join}</dl>
<script type='text/javascript'><!--
<script type='text/javascript'>
//<![CDATA[
offset = document.getElementsByClassName('active')[0].offsetTop;
height = document.getElementById('tree').clientHeight;
if (offset > (height * .7)) {
tree.scrollTop = offset - height * .3;
}
--></script>"
//]]>
</script>"
end