Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F30852269
raw.txt
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
Arlolra
Oct 18 2019, 7:41 PM
2019-10-18 19:41:46 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
raw.txt
View Options
diff --git a/lib/ext/Poem/index.js b/lib/ext/Poem/index.js
index 7c93a16f3..a233b0ea6 100644
--- a/lib/ext/Poem/index.js
+++ b/lib/ext/Poem/index.js
@@ -34,11 +34,12 @@ const toDOM = Promise.async(function *(state, content, args) {
.replace(/^(-+)<\/poem>/mg, '$1\n');
}).join('');
// Replace colons with indented spans
- content = content.replace(/^(:+)(.+)$/g, function(match, colons, verse) {
+ content = content.replace(/^(:+)(.+)$/gm, function(match, colons, verse) {
const span = dummyDoc.createElement('span');
span.setAttribute('class', 'mw-poem-indented');
span.setAttribute('style', 'display: inline-block; margin-left: ' + colons.length + 'em;');
- span.appendChild(dummyDoc.createTextNode(verse));
+ // span.appendChild(dummyDoc.createTextNode(verse));
+ span.innerHTML = verse; // FIXME: Is this safe?
return span.outerHTML;
});
}
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
8134430
Default Alt Text
raw.txt (1 KB)
Attached To
Mode
P9393 (An Untitled Masterwork)
Attached
Detach File
Event Timeline
Log In to Comment