feat: stage edits to published articles as drafts (#14842)
This commit is contained in:
@@ -67,8 +67,11 @@ const createMarkdownInstance = (linkify = true) => {
|
||||
// `<!--cw-colwidths:...-->` comment before the table. It exists only for the
|
||||
// editor's markdown round-trip and must never surface as text — markdown-it runs
|
||||
// with `html: false`, which would otherwise escape it into a visible comment in
|
||||
// rendered/plain output (e.g. dashboard search snippets). Strip it on the way in.
|
||||
const COLWIDTHS_MARKER_REGEX = /<!--cw-colwidths:[\d,]+-->\r?\n?/g;
|
||||
// rendered/plain output (e.g. dashboard search snippets). Strip the whole marker
|
||||
// line, including any blockquote prefix, so a quoted table's `>` prefixes don't
|
||||
// collapse together and break table parsing.
|
||||
const COLWIDTHS_MARKER_REGEX =
|
||||
/^[ \t>]*<!--cw-colwidths:[\d,]+-->[ \t]*\r?\n?/gm;
|
||||
|
||||
const TWITTER_USERNAME_REGEX = /(^|[^@\w])@(\w{1,15})\b/g;
|
||||
const TWITTER_USERNAME_REPLACEMENT = '$1[@$2](http://twitter.com/$2)';
|
||||
|
||||
Reference in New Issue
Block a user