feat: stage edits to published articles as drafts (#14842)

This commit is contained in:
Sivin Varghese
2026-07-16 12:44:10 +05:30
committed by GitHub
parent f1a07657e9
commit 0fccb7dacd
21 changed files with 1280 additions and 59 deletions
@@ -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)';