1-- update README.md based on MANUAL.txt
2-- assumes that the README.md has a div with id 'description'.
3-- this gets replaced by the contents of the 'description' section
7 if elem.classes[1] and elem.classes[1] == 'description' then
8 local f = assert(io.open("MANUAL.txt", "r"))
9 local manual = f:read("*all")
11 local description = {}
14 local mdoc = pandoc.read(manual, "markdown")
15 local blocks = mdoc.blocks
17 if blocks[i].t == 'Header' then
21 table.insert(description, pandoc.walk_block(blocks[i],
22 -- remove internal links
24 if el.target:match("^#") then
29 if blocks[i].t == 'Header' and
30 blocks[i].identifier == 'description' then
35 return pandoc.Div(description, pandoc.Attr("description",{},{}))
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list