[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Regression in org-element-fixed-width-parser? Extra newline added after
Regression in org-element-fixed-width-parser? Extra newline added after exported block
Tue, 19 Jan 2021 20:45:22 +0100
I wrote two Org exporters[1,2] that each have a testsuite of their own.
I regularly run tests against Emacs 25 and 26 with their respective
Org versions. When I started to test against Emacs 27.1 with Org mode
9.3 I got test failures in both exporters: The export of a fixed with
block now contains an extra empty line after the block.
I have created a minimal test using the ox-ascii backend that shows
the same behaviour in Org core. Using git bisect, I have tracked the
source of the extra line down to this change:
Prevent spurious newline character in fixed-width area value
The commit changes the newline handling _within_ the fixed-width block
(proven by test-org-element/fixed-width-parser which is updated in
respect to the changes). But the existing test only covers the
fixed-width block itself. It does not extend to the next paragraph
after the block and so does not see the additional empty line that has
My test that fails on the extra line is attached here. When run on
against a checkout earlier than 7d9e4da44 the test succeeds, after
that it fails.
Is the extra newline a regression?
I have looked at the changes in `org-element-fixed-width-parser', but
I don't understand where the extra newline comes from as I don't
really grok the parsing routine.
I'd love to help track this down. If my patch is deemed useful to
prevent further changes to the parser then feel free to apply it.
I intend to submit ox-bb as a patch later, but I currently have
a failing test in its testsuite ;-)
How hard can it be?
- Regression in org-element-fixed-width-parser? Extra newline added after exported block,
Christian Garbs <=