remove previously NMTOKEN sanitizer (no longer needed), fix javascript XML compliance and compatibility, add boilerplate headlin to 'children' tag
This commit is contained in:
parent
435b1075fa
commit
1c9b22500d
@ -131,7 +131,13 @@ module Manual
|
|||||||
"<li><a href='#{child[:url]}'>#{child[:title]}</a></li>"
|
"<li><a href='#{child[:url]}'>#{child[:title]}</a></li>"
|
||||||
end.uniq
|
end.uniq
|
||||||
|
|
||||||
"<ul>#{entries.join}</ul>"
|
"<div class='chapter_content'>
|
||||||
|
<p>This chapter covers:</p>
|
||||||
|
<ul>
|
||||||
|
#{entries.join}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -165,10 +171,6 @@ module Manual
|
|||||||
position ? [current, position, level + 1] : [current]
|
position ? [current, position, level + 1] : [current]
|
||||||
end
|
end
|
||||||
|
|
||||||
# def sanitize_NMTOKEN(s)
|
|
||||||
# 'ID'+s.gsub(/[^0-9A-z:_.-]/, '_')
|
|
||||||
# end
|
|
||||||
|
|
||||||
def render(context)
|
def render(context)
|
||||||
|
|
||||||
@source = '_manual' #context.registers[:site].source
|
@source = '_manual' #context.registers[:site].source
|
||||||
@ -239,13 +241,15 @@ module Manual
|
|||||||
end
|
end
|
||||||
|
|
||||||
"<dl>#{tree.join}</dl>
|
"<dl>#{tree.join}</dl>
|
||||||
<script type='text/javascript'><!--
|
<script type='text/javascript'>
|
||||||
|
//<![CDATA[
|
||||||
offset = document.getElementsByClassName('active')[0].offsetTop;
|
offset = document.getElementsByClassName('active')[0].offsetTop;
|
||||||
height = document.getElementById('tree').clientHeight;
|
height = document.getElementById('tree').clientHeight;
|
||||||
if (offset > (height * .7)) {
|
if (offset > (height * .7)) {
|
||||||
tree.scrollTop = offset - height * .3;
|
tree.scrollTop = offset - height * .3;
|
||||||
}
|
}
|
||||||
--></script>"
|
//]]>
|
||||||
|
</script>"
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user