We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c0ec29c commit 61d91ebCopy full SHA for 61d91eb
src/doc.js
@@ -150,6 +150,9 @@ var prototype = node.derive({
150
baseline: line.baseline,
151
left,
152
content: {
153
+ // replace( /&(?!#?[a-z0-9]+;)/, '&' ) is to replace ampersand char with '&'
154
+ // as `&` can't be rendered in an SVG text
155
+ // The regex explainer https://regex101.com/r/4vhX9N/1
156
text: text.run.text.trim().replace( /&(?!#?[a-z0-9]+;)/, '&' ) + ' '.repeat( word.space.length ),
157
size: text.run.size || this.defaultFormatting.size,
158
font: text.run.font || this.defaultFormatting.font,
0 commit comments