diff --git a/hgext/releasenotes.py b/hgext/releasenotes.py --- a/hgext/releasenotes.py +++ b/hgext/releasenotes.py @@ -70,7 +70,7 @@ DEFAULT_SECTIONS = [ (b'api', _(b'API Changes')), ] -RE_DIRECTIVE = re.compile(br'^\.\. ([a-zA-Z0-9_]+)::\s*([^$]+)?$') +RE_DIRECTIVE = re.compile(br'^\.\. ([a-zA-Z0-9_]+)::\s*([^$]+)?$', re.MULTILINE) RE_ISSUE = br'\bissue ?[0-9]{4,6}(?![0-9])\b' BULLET_SECTION = _(b'Other Changes') diff --git a/tests/test-releasenotes-formatting.t b/tests/test-releasenotes-formatting.t --- a/tests/test-releasenotes-formatting.t +++ b/tests/test-releasenotes-formatting.t @@ -387,6 +387,8 @@ Testing output for the --check (-c) flag $ touch a $ hg -q commit -A -l - << EOF + > commit 2 + > > .. asf:: > > First paragraph under this admonition. @@ -395,7 +397,7 @@ Testing output for the --check (-c) flag Suggest similar admonition in place of the invalid one. $ hg releasenotes -r . -c - Invalid admonition 'asf' present in changeset 4026fe9e1c20 + Invalid admonition 'asf' present in changeset 99fa3c800c5e $ touch b $ hg -q commit -A -l - << EOF @@ -405,7 +407,7 @@ Suggest similar admonition in place of t > EOF $ hg releasenotes -r . -c - Invalid admonition 'fixes' present in changeset 0e7130d2705c + Invalid admonition 'fixes' present in changeset 4737b1b5afd1 (did you mean fix?) $ cd ..