aboutsummaryrefslogtreecommitdiff
path: root/tools/extract-changes.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tools/extract-changes.lua')
-rw-r--r--tools/extract-changes.lua18
1 files changed, 18 insertions, 0 deletions
diff --git a/tools/extract-changes.lua b/tools/extract-changes.lua
new file mode 100644
index 000000000..5d19c8d03
--- /dev/null
+++ b/tools/extract-changes.lua
@@ -0,0 +1,18 @@
+-- Extract changes from latest version in changelog.
+
+function Pandoc(el)
+ local newblocks = {}
+ i = 1
+ while i <= #el.blocks and
+ not (el.blocks[i].t == "Header" and el.blocks[i].level == 2) do
+ i = i+1
+ end
+ while i <= #el.blocks do
+ i = i+1
+ if el.blocks[i].t == "Header" and el.blocks[i].level == 2 then
+ break
+ end
+ table.insert(newblocks, el.blocks[i])
+ end
+ return pandoc.Pandoc(newblocks)
+end