Previously (<=MW 1.25) we could add code that adds linebreaks on insert with
.
E.g.
<charinsert label="Foo Bar"><nowiki>Foo Bar</charinsert></nowiki>
inserts
Foo Bar
In MW 1.27.1 these are returned as �.
Previously (<=MW 1.25) we could add code that adds linebreaks on insert with
.
E.g.
<charinsert label="Foo Bar"><nowiki>Foo Bar</charinsert></nowiki>
inserts
Foo Bar
In MW 1.27.1 these are returned as �.
Hmm, does this work?
#x0A;
instead of #13;
(Note: I am not a dev. I just poked around on google a bit, and also noticed that roundtripping #13;
in parsoid resulted in #x0A;
...)
Tried it before. It's also not working, but differently:
:


does the linebreak in the links (but we want them in the inserted text):
Can't you try on mediawiki.org?
<charinsert label="Foo Bar"><nowiki>Foo Bar</charinsert></nowiki>
I assume you've tried a raw linebreak, too?
(I'm not comfortable with personally testing things on such a prominent interface element on mediawiki.org, and the CharInsert doesn't appear to be functional at Testwiki: or https://en.wikipedia.beta.wmflabs.org ... so I can't do testing there... :/ )
I'll try to find a dev to take a look...

 (newline) is much more correct than #13 (carriage return)
I cant really reproduce what you are describing. It sounds almost like you are running into doBlockLevels() (aka pre formatting when you start a line with a space). Can you paste the exact code you are using?
The syntax you are using is a bit odd. Nowiki is misnested, and you have a label attribute which isnt part of the extension...
As an aside you can test charinsert on any page during preview. You do not need to edit mediawiki ns to test.
Meanwhile was changed to https://www.mediawiki.org/w/index.php?title=Extension%3ACharInsert&type=revision&diff=2239365&oldid=2235689
This fixes it I guess. Just not when you want a working button. Add this button:
<charinsert><nowiki>{{Infobox | }}</nowiki></charinsert>
Now I need to hack my label attribute back in...
Thanks!
Try killing the space between the and the |:
<charinsert>{{Infobox | }}</charinsert>
Perhaps the extension should be changed so that charInsertHook() returns an array with first parameter the current return value and a 'markerType' => 'nowiki'
parameter.