flinker-markdown 1.1.20 → 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,6 +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.footer = new MDLineGrammarRule();
87
+ this.footer.matcher = [/^! (.*)$/, '<footer>$1/footer>'];
88
+ this.footer.childrenInlineRules = this.globalRule.childrenInlineRules;
89
+ this.footer.preProccessing = defLinePreproccessing;
86
90
  this.tilde = new MDLineGrammarRule();
87
91
  this.tilde.matcher = [/^~ (.*)$/, '<p><strong>$1</strong></p>'];
88
92
  this.tilde.childrenInlineRules = this.globalRule.childrenInlineRules;
@@ -124,10 +128,15 @@ export class MDGrammar {
124
128
  this.p.matcher = [/^(.*)$/, '<p>$1</p>'];
125
129
  this.p.childrenInlineRules = this.globalRule.childrenInlineRules;
126
130
  this.p.preProccessing = defLinePreproccessing;
127
- this.globalRule.childrenLineRules = [this.header, this.quote, 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];
128
132
  //
129
133
  // MULTILINE GRAMMAR RULES
130
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];
131
140
  this.ol = new MDMultilineGrammarRule();
132
141
  this.ul = new MDMultilineGrammarRule();
133
142
  this.ol.startMatcher = [/^```ol *$/, '<ol>'];
@@ -154,9 +163,9 @@ export class MDGrammar {
154
163
  this.div.startMatcher = [/^```([a-zA-Z]+) */, '<div class="$1"><div>'];
155
164
  this.div.endMatcher = [/^``` *$/, '</div></div>'];
156
165
  this.div.childrenInlineRules = this.globalRule.childrenInlineRules;
157
- this.div.childrenLineRules = [this.quote, this.alignCenter, this.alignRight, this.tilde, this.horRule, this.br, this.p];
158
- this.div.childrenMultilineRules = [this.ol, this.ul, this.table, this.div];
159
- 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];
160
169
  }
161
170
  }
162
171
  class MDParserContext {
@@ -38,6 +38,7 @@ export declare class MDGrammar {
38
38
  readonly link: MDInlineGrammarRule;
39
39
  readonly header: MDLineGrammarRule;
40
40
  readonly quote: MDLineGrammarRule;
41
+ readonly footer: MDLineGrammarRule;
41
42
  readonly alignRight: MDLineGrammarRule;
42
43
  readonly tilde: MDLineGrammarRule;
43
44
  readonly alignCenter: MDLineGrammarRule;
@@ -49,6 +50,7 @@ export declare class MDGrammar {
49
50
  readonly uli: MDLineGrammarRule;
50
51
  readonly audio: MDLineGrammarRule;
51
52
  readonly video: MDLineGrammarRule;
53
+ readonly quoteMultiline: MDMultilineGrammarRule;
52
54
  readonly ol: MDMultilineGrammarRule;
53
55
  readonly ul: MDMultilineGrammarRule;
54
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.20",
4
+ "version": "1.1.22",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/Dittner/FlinkerMD.git"