On 07/03/2023 20:59, Ihor Radchenko wrote:
I agree about the last example, but what about "Heading [0/1] text"?
Both "Heading" and "[0/1]" have the same :post-blank " ", so when
stripping the statistics cookie use " " :post-blank for "Heading"
(retain current value).
Max Nikulin writes:
On 05/03/2023 20:01, Ihor Radchenko wrote:
It might be enough to use spaces if and only if there are no preceding
spaces. Or not. One may think of other edge cases.
An idea: retain :post-blank having more spaces. Newline > tab, tab = 8
spaces.
May you elaborate about "newline > tab, tab = 8 spaces"?
Consider your earlier example:
Text with newline\\
[footnote] more text.
Line-break has :post-blank "\n" that is greater than the " "
:post-blank value of the footnote reference, so when dropping the
footnote retain "\n" from line break.
---- 8< ----
Text [footnote]
next line
---- >8 ----
Use "\n " from "[footnote]" because it is greater than " " that is
:post-blank of "Text".