Update editor, workspace, Git services, appearance, and project guides
This commit is contained in:
@@ -2,10 +2,18 @@ import MarkdownIt from "markdown-it";
|
||||
import type { Token } from "markdown-it";
|
||||
import { inlineMathEnd } from "./inlineMath.ts";
|
||||
import { pluginHost } from "../plugins/registry.ts";
|
||||
import { hasTableDelimiter } from "../editor/markdownTable.ts";
|
||||
|
||||
const markdown = new MarkdownIt({ html: false, linkify: true, breaks: false });
|
||||
export const escapeHtml = markdown.utils.escapeHtml;
|
||||
|
||||
// Require a row delimiter so deleting a blank line cannot turn prose into cells.
|
||||
// Markdown-it checks blockquote terminators while it reads a table body.
|
||||
markdown.block.ruler.before("table", "table_prose_boundary", (state, line, _end, silent) => {
|
||||
return silent && state.parentType === "table" &&
|
||||
!hasTableDelimiter(state.src.slice(state.bMarks[line] + state.tShift[line], state.eMarks[line]));
|
||||
}, { alt: ["blockquote"] });
|
||||
|
||||
// Inline note formats also round-trip through the table cell editor.
|
||||
markdown.inline.ruler.before("emphasis", "note_formats", (state, silent) => {
|
||||
const marker = ["==", "%%", "$"].find(value => state.src.startsWith(value, state.pos));
|
||||
|
||||
Reference in New Issue
Block a user