flinker-markdown 1.1.21 → 1.1.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/esm/md.js CHANGED
@@ -83,10 +83,10 @@ export class MDGrammar {
83
83
  this.quote.matcher = [/^> (.*)$/, '<blockquote><p>$1</p></blockquote>'];
84
84
  this.quote.childrenInlineRules = this.globalRule.childrenInlineRules;
85
85
  this.quote.preProccessing = defLinePreproccessing;
86
- this.quoteFooter = new MDLineGrammarRule();
87
- this.quoteFooter.matcher = [/^>> (.*)$/, '<footer>$1</footer>'];
88
- this.quoteFooter.childrenInlineRules = this.globalRule.childrenInlineRules;
89
- this.quoteFooter.preProccessing = defLinePreproccessing;
86
+ this.footer = new MDLineGrammarRule();
87
+ this.footer.matcher = [/^! (.*)$/, '<footer>$1/footer>'];
88
+ this.footer.childrenInlineRules = this.globalRule.childrenInlineRules;
89
+ this.footer.preProccessing = defLinePreproccessing;
90
90
  this.tilde = new MDLineGrammarRule();
91
91
  this.tilde.matcher = [/^~ (.*)$/, '<p><strong>$1</strong></p>'];
92
92
  this.tilde.childrenInlineRules = this.globalRule.childrenInlineRules;
@@ -128,10 +128,15 @@ export class MDGrammar {
128
128
  this.p.matcher = [/^(.*)$/, '<p>$1</p>'];
129
129
  this.p.childrenInlineRules = this.globalRule.childrenInlineRules;
130
130
  this.p.preProccessing = defLinePreproccessing;
131
- this.globalRule.childrenLineRules = [this.header, this.quote, this.quoteFooter, this.alignCenter, this.alignRight, this.tilde, this.audio, this.video, this.horRule, this.stars, this.br, this.p];
131
+ this.globalRule.childrenLineRules = [this.header, this.tilde, this.quote, this.alignCenter, this.alignRight, this.footer, this.audio, this.video, this.horRule, this.stars, this.br, this.p];
132
132
  //
133
133
  // MULTILINE GRAMMAR RULES
134
134
  //
135
+ this.quoteMultiline = new MDMultilineGrammarRule();
136
+ this.quoteMultiline.startMatcher = [/^>> *$/, '<blockquote>'];
137
+ this.quoteMultiline.endMatcher = [/^<< *$/, '</blockquote>'];
138
+ this.quoteMultiline.childrenInlineRules = this.globalRule.childrenInlineRules;
139
+ this.quoteMultiline.childrenLineRules = [this.footer, this.alignCenter, this.alignRight, this.tilde, this.horRule, this.br, this.p];
135
140
  this.ol = new MDMultilineGrammarRule();
136
141
  this.ul = new MDMultilineGrammarRule();
137
142
  this.ol.startMatcher = [/^```ol *$/, '<ol>'];
@@ -158,9 +163,9 @@ export class MDGrammar {
158
163
  this.div.startMatcher = [/^```([a-zA-Z]+) */, '<div class="$1"><div>'];
159
164
  this.div.endMatcher = [/^``` *$/, '</div></div>'];
160
165
  this.div.childrenInlineRules = this.globalRule.childrenInlineRules;
161
- this.div.childrenLineRules = [this.quote, this.quoteFooter, this.alignCenter, this.alignRight, this.tilde, this.horRule, this.br, this.p];
162
- this.div.childrenMultilineRules = [this.ol, this.ul, this.table, this.div];
163
- this.globalRule.childrenMultilineRules = [this.ol, this.ul, this.table, this.div];
166
+ this.div.childrenLineRules = [this.quote, this.tilde, this.alignCenter, this.alignRight, this.footer, this.horRule, this.br, this.p];
167
+ this.div.childrenMultilineRules = [this.ol, this.ul, this.table, this.quoteMultiline, this.div];
168
+ this.globalRule.childrenMultilineRules = [this.ol, this.ul, this.table, this.quoteMultiline, this.div];
164
169
  }
165
170
  }
166
171
  class MDParserContext {
@@ -38,7 +38,7 @@ export declare class MDGrammar {
38
38
  readonly link: MDInlineGrammarRule;
39
39
  readonly header: MDLineGrammarRule;
40
40
  readonly quote: MDLineGrammarRule;
41
- readonly quoteFooter: MDLineGrammarRule;
41
+ readonly footer: MDLineGrammarRule;
42
42
  readonly alignRight: MDLineGrammarRule;
43
43
  readonly tilde: MDLineGrammarRule;
44
44
  readonly alignCenter: MDLineGrammarRule;
@@ -50,6 +50,7 @@ export declare class MDGrammar {
50
50
  readonly uli: MDLineGrammarRule;
51
51
  readonly audio: MDLineGrammarRule;
52
52
  readonly video: MDLineGrammarRule;
53
+ readonly quoteMultiline: MDMultilineGrammarRule;
53
54
  readonly ol: MDMultilineGrammarRule;
54
55
  readonly ul: MDMultilineGrammarRule;
55
56
  readonly table: MDMultilineGrammarRule;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "flinker-markdown",
3
3
  "description": "Free TypeScript library for parsing markdown text (customisable, not standardized).",
4
- "version": "1.1.21",
4
+ "version": "1.1.22",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/Dittner/FlinkerMD.git"