metanorma / coradoc

Coradoc is the Core AsciiDoc Parser used by Metanorma
MIT License
1 stars 4 forks source link

ReverseAdoc tends to inject unnecessary leading and trailng white spaces #88

Open skalee opened 3 years ago

skalee commented 3 years ago

Given input HTML:

<html>
  <body>
    plain text
    <h1>h1</h1>
  </body>
</body>

ReverseAdoc produces following:

 plain text 
== h1

Note unneeded single space (U+0020) before and after "plain text".

Whilst it's syntactically harmless, it's also completely unnecessary, and leads to rather ugly, human-unfriendly output.

I'm going to fix that unless someone opposes.

ronaldtse commented 3 years ago

Agree, please fix it.