emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Regression in org-element-fixed-width-parser? Extra newline added after


From: Christian Garbs
Subject: Regression in org-element-fixed-width-parser? Extra newline added after exported block
Date: Tue, 19 Jan 2021 20:45:22 +0100
User-agent: NeoMutt/20180716

Hi all,

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:

  commit 7d9e4da447fa54633daf75a241c6b0a603c0e662
  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
popped up.


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.

Best regards
Christian


[1] https://github.com/mmitch/ox-s9y
[2] https://github.com/mmitch/ox-bb
    I intend to submit ox-bb as a patch later, but I currently have
    a failing test in its testsuite ;-)
-- 
....Christian.Garbs....................................https://www.cgarbs.de

How hard can it be?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]