Fix extract-changes.hs to use new changelog.md format.
This commit is contained in:
parent
36f02e1673
commit
415ddbe228
1 changed files with 6 additions and 3 deletions
|
@ -7,6 +7,9 @@ import Text.Pandoc.JSON
|
||||||
main = toJSONFilter extractFirst
|
main = toJSONFilter extractFirst
|
||||||
|
|
||||||
extractFirst :: Pandoc -> Pandoc
|
extractFirst :: Pandoc -> Pandoc
|
||||||
extractFirst (Pandoc meta (Para{} : BulletList bs : _)) =
|
extractFirst (Pandoc meta bs) =
|
||||||
Pandoc meta [BulletList bs]
|
let bs' = dropWhile (not . isSubhead) bs
|
||||||
extractFirst x = x
|
in Pandoc meta (takeWhile (not . isSubhead) (drop 1 bs'))
|
||||||
|
|
||||||
|
isSubhead (Header 2 _ _) = True
|
||||||
|
isSubhead _ = False
|
||||||
|
|
Loading…
Reference in a new issue