lib/grammar.tt in parse_a_changelog-0.2.3 vs lib/grammar.tt in parse_a_changelog-1.0.0
- old
+ new
@@ -33,11 +33,11 @@
end
rule releases_section
release*
end
-
+
rule release
"\n" release_header change_section? ("\n" change_section)*
end
rule release_header
@@ -51,14 +51,18 @@
rule release_date
[0-9] [0-9] [0-9] [0-9] '-' [0-9] [0-9] '-' [0-9] [0-9]
end
rule diff_section
- "\n" unreleased_diff release_diff*
+ "\n" unreleased_diff release_diff* initial_release?
end
rule unreleased_diff
'[Unreleased]: ' release_url "\n"
+ end
+
+ rule initial_release
+ '[' release_version ']: ' 'https://github.com/' (!'/' .)+ '/' (!'/' .)+ '/releases/tag/v' release_version "\n"
end
rule release_diff
'[' release_version ']: ' release_url "\n"
end