Multiverse Feedback: Cardlist | Visual spoiler | Export | Booster | Comments | Search | Recent activity
Mechanics | Upcoming releases | Skeleton

CardName: Line Breaks around Mana Symbols Cost: R Type: Bug Pow/Tgh: / Rules Text: Mana symbols do not work like word characters with regard to line breaks. (read comments for details) Flavour Text: Set/Rarity: Multiverse Feedback None

Line Breaks around Mana Symbols
{r}
 
Bug
Mana symbols do not work like word characters with regard to line breaks.

(read comments for details)
Updated on 15 Mar 2017 by Alex

History: [-]

2017-03-15 09:25:02: SecretInfiltrator created and commented on the card Line Breaks around Mana Symbols

Mana symbols do not work like characters with line breaks e. g. if your reminder text starts with a paranthesis (e. g. cycling) your "(" can be orphaned on a line with the symbol and the rest of the reminder text on the next line.

The same is true for mana symbols at the end of reminder text allowing line breaks right afterwards even if they are only followed by ".)"

Use of nonbreaking chracters does not fix that behavior (tested with non-breaking space (U+00A0) and zero-width non-breaking space (U+FEFF)).

~~~

BUG example: Glacial Bat (click link; occurs in version concurrent with this post - might change in the future)

Please post a screenshot when you're reporting a bug with how something's displayed, and also report your browser and OS. For me (Windows 7, Chrome) both the mouseover preview of Glacial Bat and the view of it on the card's page itself both appear correct: in the preview "({?}" starts the reminder text at the end of one line, with the next line start "can be paid", which seems legitimate typesetting. If you disagree, please tell me exactly what you'd want to see and why.

It's never going to be possibly to manipulate HTML into desktop publishing-worthy typesetting. Multiverse isn't trying to do perfect beautiful line formatting, though I'm happy to make tweaks if there's a sensible simple fix.

  • Screenshot
  • Firefox (though the bug can be recreated in Chrome by changing the zoom level)
  • Windows 7

Ah, I see. Linebreaks after "(" and before "{?}", or after "{b}" and before ".)". Mm, that's not very desirable.

The fix... isn't very easy, I fear. I'd need to detect clusters of word-characters-and-images and wrap them in <nobr> or similar. That part of the code is rather fiddly, and also fairly performance-critical because it gets evaluated every time the card is displayed. (There's an argument that I should store the formatted HTMLified text alongside the raw text in the database, updated at write time, so I don't need to calculate all the substitutions at read time. But that refactoring would itself be a bit of work.)

I'll see if I can find a sensible fix, or time to do it the proper way. No promises though.

2017-03-15 16:48:47: Alex edited Line Breaks around Mana Symbols

Add your comments:


(formatting help)
Enter mana symbols like this: {2}{U}{U/R}{PR}, {T} becomes {2}{u}{u/r}{pr}, {t}
You can use Markdown such as _italic_, **bold**, ## headings ##
Link to [[[Official Magic card]]] or (((Card in Multiverse)))
Include [[image of official card]] or ((image or mockup of card in Multiverse))
Make hyperlinks like this: [text to show](destination url)
What is this card's power? Merfolk of the Pearl Trident
(Signed-in users don't get captchas and can edit their comments)