From b8d59931f65b6fbbf7b2a32df209149d1fc06743 Mon Sep 17 00:00:00 2001 From: noxy Date: Thu, 5 Aug 2021 17:50:40 +0000 Subject: [PATCH] Upload New File --- patch/greentext.patch | 56 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 patch/greentext.patch diff --git a/patch/greentext.patch b/patch/greentext.patch new file mode 100644 index 0000000..468b349 --- /dev/null +++ b/patch/greentext.patch @@ -0,0 +1,56 @@ +--- ./commonmark.js.original 2021-03-27 12:41:48.000000000 -0400 ++++ ./commonmark.js 2021-07-21 17:51:49.408590728 -0400 +@@ -9877,17 +9877,42 @@ + this.cr(); + } + +- function block_quote(node, entering) { +- var attrs = this.attrs(node); +- if (entering) { +- this.cr(); +- this.tag("blockquote", attrs); +- this.cr(); +- } else { +- this.cr(); +- this.tag("/blockquote"); +- this.cr(); +- } ++ function block_quote(node, entering) { ++ var attrs = this.attrs(node); ++ if (node.firstChild !== null) { ++ var w = node.walker(), e, m=node.firstChild ++ while (m.firstChild !== null) ++ m = m.firstChild ++ while (m.type !== 'document') { ++ if (m.type == 'text' && m.literal[0] !== '>') ++ m.literal = '>' + m.literal ++ m = m.parent ++ } ++ while (e = w.next()) { ++ const n = e.node ++ if (e.entering == false) ++ continue ++ if (n.type == 'text') { ++ let o = n.parent ++ while (o.type !== 'document') ++ if (o.type == 'block_quote') ++ break ++ else ++ o = o.parent ++ if (o.type == 'block_quote' && (n.prev && n.prev.type == 'softbreak') && n.literal[0] !== '>') { ++ n.literal = '>' + n.literal ++ } ++ } ++ } ++ } ++ ++ if (entering) { ++ this.tag('font', [...attrs, ['color', '#789922']]); ++ if (!node.firstChild) ++ this.buffer += '

>

' ++ } else { ++ this.tag('/font'); ++ } + } + + function list(node, entering) {