Page MenuHomePhabricator

"new line" button in wikiEditor
Closed, InvalidPublic

Description

I propose to change the output text of "new line" button in wikiEditor to <br/>\n or <br />\n, because the actual <br> tag make useless the function of MediaWiki:Gadget-DotsSyntaxHighlighter.js. Oviously we can modify MediaWiki:Gadget-DotsSyntaxHighlighter.js to fix this problem, but i think the easiest way is to change the "new line" button output text.

Event Timeline

@Andriy.v: Hi, where to fins something called MediaWiki:Gadget-DotsSyntaxHighlighter.js and what does it do? What is a list of steps which allows others to see some problem? Please follow https://www.mediawiki.org/wiki/How_to_report_a_bug - thanks a lot!

@Aklapper : Hi, https://www.mediawiki.org/w/index.php?title=MediaWiki:Gadget-DotsSyntaxHighlighter.js is a gadget, which is used to highlight text inside tags, brackets, braces, ecc. This gadget is particulary usefull mostly to find unclosed previously mentioned elements and prevent or fix Lint errors. The gadget highlight text, which is inside any kind of HTML tag, including <br>. So if you use <br> to make a new line, the gadget will highlight all text next to this tag until it find </br> tag, which i never seen to use, so it makes useless the function of this gadget. To avoid this problem the solution is to change all <br> tags to <br /> (and so for others similar tags like <hr>), or to modify the gadget to bypassing this kind of tags.

@Andriy.v: That sounds like the gadget used on that single website should be fixed instead, and not the WikiEditor extension behavior on hundreds of other websites which are not using that gadget?

@Aklapper : Probably yes, i've write here because the immediate solution i thinked is to change all <br> tags to <br />. Also because i don't understand the difference between these two kind of syntax and why <br> syntax is better than <br />.

Changing <br> to <br /> makes no sense, as they have the absolutely same meaning.
See also https://stackoverflow.com/questions/1946426/html-5-is-it-br-br-or-br

I'm going to close this task as this seems to be the wrong workaround to solve a problem.