Topic on VisualEditor/Feedback

VE is adding incorrect wikitext <br /> for breaks versus simpler <br>

7
Timeshifter (talkcontribs)

I noticed this when I clicked the enter key in Visual Editor to separate some stuff I was working on in my sandbox. This is a bad idea.

People have come to help pages such as en:Help:Sorting on English Wikipedia and tried to replace all <br> tags with <br />. We had to revert all their work and explain to them that we are trying to make things simpler for editors, not more difficult.

By the way, why is this editing window making editing more difficult by not having a button for nowiki tags as in Wikipedia? Developers should be trying to make things easier. Now I have to go to an editing window on Wikipedia to find the correct nowiki wikitext, copy it, and then come back here. I often wonder where to put the slash. I don't have this stuff memorized.

And this crap editor keeps messing up the nowiki tags I try to enter.

Frlara (talkcontribs)

How can I add a line break from VE? I tried shift-enter and all other key combinations, but it always starts a new paragraph. I also didn't find it in the toolbar.

Timeshifter (talkcontribs)

I tried to retrace my steps, and the only thing remaining that produces this for me is when pasting in a table into the visual editor in a certain way. I did it earlier today, but I can't duplicate that way now! So I think this remaining problem can safely be ignored since it is now so obscure.

The other day I was working on editing a table, and I think at the same time I was editing en:Help:Table and writing tips in the Visual Editor section at the end. So I was paying close attention to any screw ups on my part or the part of the Visual Editor. I vaguely remember that the problem was happening more often then. So maybe it has been fixed since I started this thread 11 days ago.

Whatamidoing (WMF) (talkcontribs)

If memory serves, <br /> is considered the canonical representation, and therefore ought to be used in preference to <br>. Someone at w:en:WT:CHECKWIKI could probably tell you for certain – perhaps @NicoV or @Magioladitis would know the answer offhand?

The visual editor does not currently support the direct addition of HTML line breaks. It's something the team will likely address in the future.

Timeshifter (talkcontribs)

Thanks for the w:en:WT:CHECKWIKI link. The "list of errors" tab has this:

"A <br> or <br /> tag (note the slash) are the only standard formats." From:

Wikitext is not HTML, nor is it XML. It is wikitext. It has its own rules. Please use the simpler choice whenever possible. The KISS principle. Keep It Simple, Stupid. Wikipedia: KISS principle. The simpler things are, the more editing that gets done, by more editors.

NicoV (talkcontribs)

Both syntax are valid in HTML5, <br /> and <br>. Personally, I tend to prefer the <br />, because it's also valid XML, and it's better supported with some syntax highlighting tools.

The Anome (talkcontribs)

<br> seems like the best version to me. Wikitext was originally based on HTML (which was inspired by SGML) and didn't require the slash.

<br /> was a creation of trying to force HTML to fit XML rules as part of XHTML, a project which was abandoned in favour of HTML5.

The post-processing model of wikitext is now explicitly based on HTML5 behavior.

As far as I can see, <br> is the norm for HTML5, restoring the original HTML default which Wikitext was based on (see https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-br-element ) It's also two characters shorter and easier to read because it doesn't have a white space in the middle.

Reply to "VE is adding incorrect wikitext <br /> for breaks versus simpler <br>"