Stop generating an extra superfluous <ul></ul> in sidebar menu.
This commit is contained in:
parent
2a34765dbc
commit
54395f790d
1 changed files with 2 additions and 1 deletions
|
|
@ -9,6 +9,7 @@ fn nav_tree {
|
||||||
| sed $dirfilter'/\/[^_.\/][^\/]*(\.(md|txt|html)|\/)$/!d; s!^'$sitedir'!!; '$dirclean \
|
| sed $dirfilter'/\/[^_.\/][^\/]*(\.(md|txt|html)|\/)$/!d; s!^'$sitedir'!!; '$dirclean \
|
||||||
| sort -u | awk -F/ '
|
| sort -u | awk -F/ '
|
||||||
function p(x, y, s) { for(i=0; i < x-y; i+=1) print s }
|
function p(x, y, s) { for(i=0; i < x-y; i+=1) print s }
|
||||||
|
BEGIN { lNF=1 }
|
||||||
{
|
{
|
||||||
d = ""
|
d = ""
|
||||||
if(match($0, "/$"))
|
if(match($0, "/$"))
|
||||||
|
|
@ -28,7 +29,7 @@ fn nav_tree {
|
||||||
else
|
else
|
||||||
print "<li><a href=\"" path "\">› " bname "</a></li>"
|
print "<li><a href=\"" path "\">› " bname "</a></li>"
|
||||||
}
|
}
|
||||||
END { p(lNF, 0, "</ul>") }'
|
END { p(lNF, 1, "</ul>") }'
|
||||||
}
|
}
|
||||||
|
|
||||||
fn link_bar {
|
fn link_bar {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue