See the diff, https://www.mediawiki.org/w/index.php?title=Extension:JADE&diff=prev&oldid=2865214&diffmode=source
Leading whitespace was stripped from each line of my <source> blocks.
See the diff, https://www.mediawiki.org/w/index.php?title=Extension:JADE&diff=prev&oldid=2865214&diffmode=source
Leading whitespace was stripped from each line of my <source> blocks.
Looks like this happens as soon as the document is loaded: https://www.mediawiki.org/wiki/Extension:JADE?veaction=editsource§ion=8
This issue will be that we convert the line into "<p>[TAB][TAB]mycode</p>" and the visual editor converter turns leading/trailing whitespace inside a tag into a internal property - that gets restored when we convert back to HTML, although in 2017 source editor we used an optimised method for converting back to HTML.
We should disable the internal whitespace stripping in the converter when in source mode.
Change 456381 had a related patch set uploaded (by Esanders; owner: Esanders):
[VisualEditor/VisualEditor@master] Always treat whitespace as significant when converting for source mode
Change 458490 had a related patch set uploaded (by Esanders; owner: Esanders):
[VisualEditor/VisualEditor@master] [BREAKING CHANGE] Implement a SourceConverter
Change 458490 merged by jenkins-bot:
[VisualEditor/VisualEditor@master] [BREAKING CHANGE] Implement a SourceConverter
Change 458489 had a related patch set uploaded (by Bartosz Dziewoński; owner: Esanders):
[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (7420443fe)
Change 456381 abandoned by Bartosz Dziewoński:
Always treat whitespace as significant when converting for source mode
Reason:
Superseded by https://gerrit.wikimedia.org/r/458490
Change 458489 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (7420443fe)