Description
currently the wiki parser here and on 1.6dev creates a line break between macro calls if they are indented and do have a space in between. -- ReimarBauer 2007-04-14 17:10:34
[[Verbatim(a)]][[Verbatim(A)]]
aA
[[Verbatim(a)]][[Verbatim(A)]]
aA
[[Verbatim(a)]] [[Verbatim(A)]]
a A
Yes, you are right.
Component selection
the wiki parser
Details
here and on 1.6dev
Workaround
if you use two macros and indenting don't use a space in between.
Discussion
Currently that changeset 2023 creates pages that look like this. Even right here in THIS paragraph (before the link label "this"), it creates a wrong BR.
If that changeset is reverted, those problems vanish. And it does not create linebreaks between macro calls any more.
Yes, you are right. We should revert that changeset. The above problem seems to be fixed by some other changes later on too. So this changeset is not needed.
I was pretty sure I have added an unit test for describing that bug behaviour already. Seems I misses it:
1 diff -r b06c048233f2 MoinMoin/parser/_tests/test_text_moin_wiki.py
2 --- a/MoinMoin/parser/_tests/test_text_moin_wiki.py Sun Mar 09 00:02:17 2008 +0100
3 +++ b/MoinMoin/parser/_tests/test_text_moin_wiki.py Sun Mar 09 14:33:12 2008 +0100
4 @@ -579,6 +579,26 @@ class TestTransclusionMarkup(ParserTestC
5 result = self.needle.search(html).group(1)
6 assert result == expected
7
8 -
9 +class TestMacrosInOneLine(ParserTestCase):
10 + """ Test macro formatting
11 + """
12 +
13 + text = 'AAA %s AAA'
14 + needle = re.compile(text % r'(.+)')
15 + _tests = (
16 + # test expected
17 + (u'<<Verbatim(A)>><<Verbatim(a)>>', 'Aa'),
18 + (u' <<Verbatim(A)>><<Verbatim(a)>>', ' Aa'),
19 + (u' <<Verbatim(A)>> <<Verbatim(a)>>', ' A a'),
20 + )
21 +
22 + def testMultipleMacrosInOneLine(self):
23 + """ parser.wiki: multiple macros in one line and no linebreak"""
24 + for test, expected in self._tests:
25 + html = self.parse(self.text % test)
26 + result = self.needle.search(html).group(1)
27 + assert result == expected
28 +
29 +
30 coverage_modules = ['MoinMoin.parser.text_moin_wiki']
31
without that patch the result does not show <p class="line867">.
and removing it does fix the line break before <p class="line867"> too
-- ReimarBauer 2008-03-09 13:36:32
Plan
- Priority:
- Assigned to:
- Status: fixed for 1.7 changeset 2023 dd5240822911, revision 34: was backported for 1.6 changeset 2013:ba8fe4bd2321
reverted by http://hg.moinmo.in/moin/1.6/rev/61fdf0769363 and http://hg.moinmo.in/moin/1.7/rev/2c314d55e45d
- the initial bug is fixed nevertheless, due to other changes