Page MenuHomePhabricator

Section editing should be less aggressive about adding automatic line breaks
Closed, DuplicatePublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Edit a page to be the following wikitext
== Test ==
Test

<translate>
== Test 2 ==
</translate>
  • Source edit section 1
  • Save

What happens?:

  • visible whitespace is added that the user did not intentionally add
== Test ==
Test

<translate>

== Test 2 ==
</translate>

image.png (303×433 px, 9 KB)

What should have happened instead?:

== Test ==
Test

<translate>
== Test 2 ==
</translate>

image.png (252×414 px, 8 KB)

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

  • this especially impacts mediawikiwiki, where translation tags are often placed in this style. this creates pockets of unintentional whitespace scattered all over the wiki.
  • the algorithm is pretty aggressive about adding newline to the end of everything. whether editing the section editor or the entire page, a newline will be added...
    • when the wikitext editor is first opened
    • when you save the edit (even if you deleted the newline added when the editor is first opened)