fix: Impossible to type more than one dollar symbol in a paragraph without triggering LaTeX (#5061)
This commit is contained in:
@@ -2,7 +2,6 @@ import {
|
||||
mathBackspaceCmd,
|
||||
insertMathCmd,
|
||||
makeInlineMathInputRule,
|
||||
REGEX_INLINE_MATH_DOLLARS,
|
||||
mathSchemaSpec,
|
||||
} from "@benrbray/prosemirror-math";
|
||||
import { PluginSimple } from "markdown-it";
|
||||
@@ -21,7 +20,7 @@ import {
|
||||
import { EditorState, Plugin } from "prosemirror-state";
|
||||
import { MarkdownSerializerState } from "../lib/markdown/serializer";
|
||||
import MathPlugin from "../plugins/Math";
|
||||
import mathRule from "../rules/math";
|
||||
import mathRule, { REGEX_INLINE_MATH_DOLLARS } from "../rules/math";
|
||||
import { Dispatch } from "../types";
|
||||
import Node from "./Node";
|
||||
|
||||
@@ -71,9 +70,9 @@ export default class Math extends Node {
|
||||
}
|
||||
|
||||
toMarkdown(state: MarkdownSerializerState, node: ProsemirrorNode) {
|
||||
state.write("$");
|
||||
state.write("$$");
|
||||
state.text(node.textContent, false);
|
||||
state.write("$");
|
||||
state.write("$$");
|
||||
}
|
||||
|
||||
parseMarkdown() {
|
||||
|
||||
Reference in New Issue
Block a user