diff options
author | John MacFarlane <jgm@berkeley.edu> | 2017-12-30 10:46:08 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-12-30 10:46:08 -0800 |
commit | d5d6c9876da21e47bfb9d274648f27ea091ffa52 (patch) | |
tree | 5047e1a14235142e4fa9156021ec1778899242ab /tools | |
parent | 69e262fc5b9a85b1d36bec449a7a9418634189fe (diff) |
Fixed small bug in README generation.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/update-readme.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/update-readme.lua b/tools/update-readme.lua index 916b80881..4f77c59c2 100644 --- a/tools/update-readme.lua +++ b/tools/update-readme.lua @@ -14,6 +14,9 @@ function Div(elem) local mdoc = pandoc.read(manual, "markdown") local blocks = mdoc.blocks while blocks[i] do + if blocks[i].t == 'Header' then + include = false + end if include then table.insert(description, pandoc.walk_block(blocks[i], -- remove internal links @@ -23,12 +26,9 @@ function Div(elem) end end })) end - if blocks[i].t == 'Header' then - if blocks[i].identifier == 'description' then + if blocks[i].t == 'Header' and + blocks[i].identifier == 'description' then include = true - elseif include then - include = false - end end i = i + 1 end |