Font{s, styles} sometimes change syntax on second save

• Sep 3, 2018 - 17:05
Reported version
2.3
Type
Functional
Severity
S5 - Suggestion
Status
active
Project

Also from #274166:

「There’s also fonts and font styles. When first saving a score, I get «font face="foo"/»bar, on second save this is changed to «font face="foo"»«/font»bar. For texts, tags like font, i, etc. do not seem to behave like normal XML tags, but instead like some sort of toggle, anyway…」

I’m not able to reproduce this easily at the moment, but a “git log -p” in my music repository shows (screenshot attached) that sometimes, saving a score for the second time will change the syntacēs of the «font» tag. I’ve also seen that apply to the «i» tag, but don’t find it right now.

Screenshot_20180903_180217.png

The “semantics of the HTML-looking tags in texts seem to be a bit off occasionally, though” note I had was: in normal HTML, when I do “«font»abc«/font»def”, the effect of the font tag only applies to abc and not def, whereas MuseScore does “«font»«/font»abcdef” and applying it to both abc and def despite the font tag having closed already, i.e. using persistent state toggles instead of scoping semantics.

I find that weird.