fix: Embed with underscore in url fails when hydrating from Markdown
This commit is contained in:
@@ -127,12 +127,11 @@ export default class Embed extends Node {
|
|||||||
if (!state.inTable) {
|
if (!state.inTable) {
|
||||||
state.ensureNewLine();
|
state.ensureNewLine();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const href = node.attrs.href.replace(/_/g, "%5F");
|
||||||
|
|
||||||
state.write(
|
state.write(
|
||||||
"[" +
|
"[" + state.esc(href, false) + "](" + state.esc(href, false) + ")"
|
||||||
state.esc(node.attrs.href, false) +
|
|
||||||
"](" +
|
|
||||||
state.esc(node.attrs.href, false) +
|
|
||||||
")"
|
|
||||||
);
|
);
|
||||||
if (!state.inTable) {
|
if (!state.inTable) {
|
||||||
state.write("\n\n");
|
state.write("\n\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user