summaryrefslogtreecommitdiff
path: root/render_md.py
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2016-12-06 19:51:33 +0000
committerQuentin Young <qlyoung@cumulusnetworks.com>2016-12-06 19:51:33 +0000
commit6fd800be4ac4da8ec034f2a858e0183b8ae9bb01 (patch)
treee1a77a68567f6496415b6476a6bed52c77d64619 /render_md.py
parent3d6e734154e6da17423e9054b5443774cacfdd51 (diff)
parent9dec6b446c5487623ad04fdaa8160e3338f12799 (diff)
Merge remote-tracking branch 'osr/master' into vtysh-grammar
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com> Conflicts: lib/command_match.c
Diffstat (limited to 'render_md.py')
-rw-r--r--render_md.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/render_md.py b/render_md.py
index d2d1fb4805..16c4bbe8a3 100644
--- a/render_md.py
+++ b/render_md.py
@@ -4,11 +4,14 @@ import sys, markdown
template = '''<html><head><meta charset="UTF-8"><style type="text/css">
body { max-width: 45em; margin: auto; margin-top: 2em; margin-bottom: 2em;
- font-family:Fira Sans,sans-serif; text-align: justify; }
+ font-family:Fira Sans,sans-serif; text-align: justify;
+ counter-reset: ch2; }
pre, code { font-family:Fira Mono,monospace; }
pre > code { display: block; padding:0.5em; border:1px solid black;
background-color:#eee; color:#000; }
-h2 { clear: both; margin-top: 3em; text-decoration: underline; }
+h2:before { content: counter(ch2) ". "; counter-increment: ch2; }
+h2 { clear: both; margin-top: 3em; text-decoration: underline; counter-reset: ch3; }
+h3:before { content: counter(ch2) "." counter(ch3) ". "; counter-increment: ch3; }
h3 { clear: both; margin-top: 2em; font-weight: normal; font-style: italic; }
h4 { font-weight: normal; font-style: italic; }
img[alt~="float-right"] { float:right; margin-left:2em; margin-bottom:2em; }