Closed selden closed 10 months ago
From the link markup documentation:
SugarCube's link markup consists of a required Link component and optional Text and Setter components. The Link and Text components may be either plain text or any valid TwineScript expression, […]
The link markup's text component has never been treated as HTML, thus HTML named entities and numeric references will not work.
Changing that in v2 would be a breaking change for very little benefit.
If you need such characters to appear within links, either:
<<link>
macro.<a>
tag.[[Literal characters ©™|…]]
.The underlying issue for me is that I sometimes want multi-word text components not to be broken across multiple lines on the screen. I had hoped to be able to use between them.
Fortunately, it seems that using the HTML token pair
From: Thomas M. Edwards @.***> Sent: Tuesday, November 14, 2023 12:49 AM To: tmedwards/sugarcube-2 Cc: Selden E. Ball, Jr; Author Subject: Re: [tmedwards/sugarcube-2] Link markup does not recognize HTML Symbol entities (Issue #283)
From the link markup documentationhttps://www.motoslave.net/sugarcube/2/docs/#markup-link:
SugarCube's link markup consists of a required Link component and optional Text and Setter components. The Link and Text components may be either plain text or any valid TwineScript expression, […]
The link markup's text component has never been treated as HTML, thus HTML named entities and numeric references will not work.
Changing that in v2 would be a breaking change for very little benefit.
If you need such characters in links, either:
— Reply to this email directly, view it on GitHubhttps://github.com/tmedwards/sugarcube-2/issues/283#issuecomment-1809586328, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AACWNDDO4CM7MCJYDMXABELYEMA5LAVCNFSM6AAAAAA7KBMOWGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBZGU4DMMZSHA. You are receiving this because you authored the thread.Message ID: @.***>
Describe the bug. Link markup does not recognize HTML Symbol entities
To Reproduce: Use an HTML Symbol entity in the text component of the link markup.
Expected behavior. The symbol should be seen when the markup is rendered. Instead, the characters comprising the symbol's name are shown.
Symbols are shown when the Link macro is used. Markup should show them too.
Screenshots. for chrome w/sugarcube 2.36 and firefox w/sugarcube 2.37 are attached
Project details.
Desktop details.
Smartphone/tablet details. not tested
Additional context. Zip containing test_symbol.tw is attached.
test_symbol.zip