mirror of
https://github.com/elder-plinius/P4RS3LT0NGV3.git
synced 2026-06-06 06:53:56 +02:00
Fix potential lockups: make strikethrough/underline robust without emojiLibrary; site tab wiring unchanged; investigate CSS/HTML if issue persists
This commit is contained in:
+8
-2
@@ -452,7 +452,10 @@ const transforms = {
|
||||
name: 'Strikethrough',
|
||||
func: function(text) {
|
||||
// Use proper Unicode combining characters for strikethrough
|
||||
const segments = window.emojiLibrary.splitEmojis(text);
|
||||
const splitter = (typeof window !== 'undefined' && window.emojiLibrary && window.emojiLibrary.splitEmojis)
|
||||
? window.emojiLibrary.splitEmojis
|
||||
: (t) => Array.from(t);
|
||||
const segments = splitter(text);
|
||||
return segments.map(c => c + '\u0336').join('');
|
||||
},
|
||||
preview: function(text) {
|
||||
@@ -469,7 +472,10 @@ const transforms = {
|
||||
name: 'Underline',
|
||||
func: function(text) {
|
||||
// Use proper Unicode combining characters for underline
|
||||
const segments = window.emojiLibrary.splitEmojis(text);
|
||||
const splitter = (typeof window !== 'undefined' && window.emojiLibrary && window.emojiLibrary.splitEmojis)
|
||||
? window.emojiLibrary.splitEmojis
|
||||
: (t) => Array.from(t);
|
||||
const segments = splitter(text);
|
||||
return segments.map(c => c + '\u0332').join('');
|
||||
},
|
||||
preview: function(text) {
|
||||
|
||||
Reference in New Issue
Block a user