2024-09-14 16:49:09 -04:00
|
|
|
--- a/node_modules/commonmark/dist/commonmark.js
|
|
|
|
+++ b/node_modules/commonmark/dist/commonmark.js
|
|
|
|
@@ -11086,14 +11086,54 @@
|
|
|
|
|
|
|
|
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.cr();
|
|
|
|
- this.tag("blockquote", attrs);
|
|
|
|
- this.cr();
|
|
|
|
+ this.tag('font', [...attrs, ['color', '#789922']]);
|
|
|
|
+
|
|
|
|
+ if (!node.firstChild) {
|
|
|
|
+ this.buffer += '<p>></p>'
|
|
|
|
+ }
|
|
|
|
} else {
|
|
|
|
- this.cr();
|
|
|
|
- this.tag("/blockquote");
|
|
|
|
- this.cr();
|
|
|
|
+ this.tag('/font');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
--- a/node_modules/commonmark/dist/commonmark.min.js
|
|
|
|
+++ b/node_modules/commonmark/dist/commonmark.min.js
|
|
|
|
@@ -1 +1 @@
|
2024-10-30 14:21:22 -04:00
|
|
|
-!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((e=e||self).commonmark={})}(this,function(e){"use strict";function i(e){switch(e._type){case"document":case"block_quote":case"list":case"item":case"paragraph":case"heading":case"emph":case"strong":case"link":case"image":case"custom_inline":case"custom_block":return!0;default:return!1}}function B(e,r){this.current=e,this.entering=!0===r}function H(){var e,r=this.current,t=this.entering;return null===r?null:(e=i(r),t&&e?r._firstChild?(this.current=r._firstChild,this.entering=!0):this.entering=!1:r===this.root?this.current=null:null===r._next?(this.current=r._parent,this.entering=!1):(this.current=r._next,this.entering=!0),{entering:t,node:r})}function O(e){return{current:e,root:e,entering:!0,next:H,resumeAt:B}}var b=function(e,r){this._type=e,this._parent=null,this._firstChild=null,this._lastChild=null,this._prev=null,this._next=null,this._sourcepos=r,this._open=!0,this._string_content=null,this._literal=null,this._listData={},this._info=null,this._destination=null,this._title=null,this._isFenced=!1,this._fenceChar=null,this._fenceLength=0,this._fenceOffset=null,this._level=null,this._onEnter=null,this._onExit=null},r=b.prototype,l=(Object.defineProperty(r,"isContainer",{get:function(){return i(this)}}),Object.defineProperty(r,"type",{get:function(){return this._type}}),Object.defineProperty(r,"firstChild",{get:function(){return this._firstChild}}),Object.defineProperty(r,"lastChild",{get:function(){return this._lastChild}}),Object.defineProperty(r,"next",{get:function(){return this._next}}),Object.defineProperty(r,"prev",{get:function(){return this._prev}}),Object.defineProperty(r,"parent",{get:function(){return this._parent}}),Object.defineProperty(r,"sourcepos",{get:function(){return this._sourcepos}}),Object.defineProperty(r,"literal",{get:function(){return this._literal},set:function(e){this._literal=e}}),Object.defineProperty(r,"destination",{get:function(){return this._destination},set:function(e){this._destination=e}}),Object.defineProperty(r,"title",{get:function(){return this._title},set:function(e){this._title=e}}),Object.defineProperty(r,"info",{get:function(){return this._info},set:function(e){this._info=e}}),Object.defineProperty(r,"level",{get:function(){return this._level},set:function(e){this._level=e}}),Object.defineProperty(r,"listType",{get:function(){return this._listData.type},set:function(e){this._listData.type=e}}),Object.defineProperty(r,"listTight",{get:function(){return this._listData.tight},set:function(e){this._listData.tight=e}}),Object.defineProperty(r,"listStart",{get:function(){return this._listData.start},set:function(e){this._listData.start=e}}),Object.defineProperty(r,"listDelimiter",{get:function(){return this._listData.delimiter},set:function(e){this._listData.delimiter=e}}),Object.defineProperty(r,"onEnter",{get:function(){return this._onEnter},set:function(e){this._onEnter=e}}),Object.defineProperty(r,"onExit",{get:function(){return this._onExit},set:function(e){this._onExit=e}}),b.prototype.appendChild=function(e){e.unlink(),(e._parent=this)._lastChild?(this._lastChild._next=e)._prev=this._lastChild:this._firstChild=e,this._lastChild=e},b.prototype.prependChild=function(e){e.unlink(),(e._parent=this)._firstChild?((this._firstChild._prev=e)._next=this._firstChild,this._firstChild=e):(this._firstChild=e,this._lastChild=e)},b.prototype.unlink=function(){this._prev?this._prev._next=this._next:this._parent&&(this._parent._firstChild=this._next),this._next?this._next._prev=this._prev:this._parent&&(this._parent._lastChild=this._prev),this._parent=null,this._next=null,this._prev=null},b.prototype.insertAfter=function(e){e.unlink(),e._next=this._next,e._next&&(e._next._prev=e),((e._prev=this)._next=e)._parent=this._parent,e._next||(e._parent._lastChild=e)},b.prototype.insertBefore=function(e){e.unlink(),e._prev=this._prev,e._prev&&(e._prev._next=e),((e._next=this)._prev=e)._parent=this._parent,e._prev||(e._parent._firstChild=e)},b.prototype.walker=fu
|
2024-09-14 16:49:09 -04:00
|
|
|
+(function(global,factory){typeof exports==="object"&&typeof module!=="undefined"?factory(exports):typeof define==="function"&&define.amd?define(["exports"],factory):(global=global||self,factory(global.commonmark={}))})(this,function(exports){"use strict";function isContainer(node){switch(node._type){case"document":case"block_quote":case"list":case"item":case"paragraph":case"heading":case"emph":case"strong":case"link":case"image":case"custom_inline":case"custom_block":return true;default:return false}}var resumeAt=function(node,entering){this.current=node;this.entering=entering===true};var next=function(){var cur=this.current;var entering=this.entering;if(cur===null){return null}var container=isContainer(cur);if(entering&&container){if(cur._firstChild){this.current=cur._firstChild;this.entering=true}else{this.entering=false}}else if(cur===this.root){this.current=null}else if(cur._next===null){this.current=cur._parent;this.entering=false}else{this.current=cur._next;this.entering=true}return{entering:entering,node:cur}};var NodeWalker=function(root){return{current:root,root:root,entering:true,next:next,resumeAt:resumeAt}};var Node=function(nodeType,sourcepos){this._type=nodeType;this._parent=null;this._firstChild=null;this._lastChild=null;this._prev=null;this._next=null;this._sourcepos=sourcepos;this._open=true;this._string_content=null;this._literal=null;this._listData={};this._info=null;this._destination=null;this._title=null;this._isFenced=false;this._fenceChar=null;this._fenceLength=0;this._fenceOffset=null;this._level=null;this._onEnter=null;this._onExit=null};var proto=Node.prototype;Object.defineProperty(proto,"isContainer",{get:function(){return isContainer(this)}});Object.defineProperty(proto,"type",{get:function(){return this._type}});Object.defineProperty(proto,"firstChild",{get:function(){return this._firstChild}});Object.defineProperty(proto,"lastChild",{get:function(){return this._lastChild}});Object.defineProperty(proto,"next",{get:function(){return this._next}});Object.defineProperty(proto,"prev",{get:function(){return this._prev}});Object.defineProperty(proto,"parent",{get:function(){return this._parent}});Object.defineProperty(proto,"sourcepos",{get:function(){return this._sourcepos}});Object.defineProperty(proto,"literal",{get:function(){return this._literal},set:function(s){this._literal=s}});Object.defineProperty(proto,"destination",{get:function(){return this._destination},set:function(s){this._destination=s}});Object.defineProperty(proto,"title",{get:function(){return this._title},set:function(s){this._title=s}});Object.defineProperty(proto,"info",{get:function(){return this._info},set:function(s){this._info=s}});Object.defineProperty(proto,"level",{get:function(){return this._level},set:function(s){this._level=s}});Object.defineProperty(proto,"listType",{get:function(){return this._listData.type},set:function(t){this._listData.type=t}});Object.defineProperty(proto,"listTight",{get:function(){return this._listData.tight},set:function(t){this._listData.tight=t}});Object.defineProperty(proto,"listStart",{get:function(){return this._listData.start},set:function(n){this._listData.start=n}});Object.defineProperty(proto,"listDelimiter",{get:function(){return this._listData.delimiter},set:function(delim){this._listData.delimiter=delim}});Object.defineProperty(proto,"onEnter",{get:function(){return this._onEnter},set:function(s){this._onEnter=s}});Object.defineProperty(proto,"onExit",{get:function(){return this._onExit},set:function(s){this._onExit=s}});Node.prototype.appendChild=function(child){child.unlink();child._parent=this;if(this._lastChild){this._lastChild._next=child;child._prev=this._lastChild;this._lastChild=child}else{this._firstChild=child;this._lastChild=child}};Node.prototype.prependChild=function(child){child.unlink();child._parent=this;if(this._firstChild){this._firstChild._prev=child;child._next=this._firstChild;this._firstChild=child}else{this._firstChild=child;this._lastChild=child}};Node.prototype.unlink=function(){if(this._prev){this._prev._next=this._next}else if(this._parent){this._p
|
|
|
|
--- a/node_modules/commonmark/lib/render/html.js
|
|
|
|
+++ b/node_modules/commonmark/lib/render/html.js
|
|
|
|
@@ -168,14 +168,54 @@
|
|
|
|
|
|
|
|
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.cr();
|
|
|
|
- this.tag("blockquote", attrs);
|
|
|
|
- this.cr();
|
|
|
|
+ this.tag('font', [...attrs, ['color', '#789922']]);
|
|
|
|
+
|
|
|
|
+ if (!node.firstChild) {
|
|
|
|
+ this.buffer += '<p>></p>'
|
|
|
|
+ }
|
|
|
|
} else {
|
|
|
|
- this.cr();
|
|
|
|
- this.tag("/blockquote");
|
|
|
|
- this.cr();
|
|
|
|
+ this.tag('/font');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|