flinker-markdown 1.1.6 → 1.1.7

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
@@ -81,20 +81,22 @@ export class MDGrammar {
81
81
  this.quote.matcher = [/^> (.*)$/, '<blockquote><p>$1</p></blockquote>'];
82
82
  this.quote.childrenInlineRules = this.globalRule.childrenInlineRules;
83
83
  this.quote.preProccessing = defLinePreproccessing;
84
+ this.tilde = new MDLineGrammarRule();
85
+ this.tilde.matcher = [/^~ (.*)$/, '<p class="md-tilde">$1</p>'];
86
+ this.tilde.childrenInlineRules = this.globalRule.childrenInlineRules;
87
+ this.tilde.preProccessing = defLinePreproccessing;
88
+ this.warn = new MDLineGrammarRule();
89
+ this.warn.matcher = [/^! (.*)$/, '<p class="md-warn">$1</p>'];
90
+ this.warn.childrenInlineRules = this.globalRule.childrenInlineRules;
91
+ this.warn.preProccessing = defLinePreproccessing;
84
92
  this.alignRight = new MDLineGrammarRule();
85
- this.alignRight.matcher = [/^==> (.*)$/, '<div class="md-right">$1</div>'];
93
+ this.alignRight.matcher = [/^==> (.*)$/, '<p class="md-right">$1</p>'];
86
94
  this.alignRight.childrenInlineRules = this.globalRule.childrenInlineRules;
87
95
  this.alignRight.preProccessing = defLinePreproccessing;
88
96
  this.alignCenter = new MDLineGrammarRule();
89
- this.alignCenter.matcher = [/^=> (.*)$/, '<div class="md-center">$1</div>'];
97
+ this.alignCenter.matcher = [/^=> (.*)$/, '<p class="md-center">$1</p>'];
90
98
  this.alignCenter.childrenInlineRules = this.globalRule.childrenInlineRules;
91
99
  this.alignCenter.preProccessing = defLinePreproccessing;
92
- this.stars = new MDLineGrammarRule();
93
- this.stars.matcher = [/^(\*{3,})/, '<p class="md-delim">$1</p>'];
94
- this.p = new MDLineGrammarRule();
95
- this.p.matcher = [/^(.*)$/, '<p>$1</p>'];
96
- this.p.childrenInlineRules = this.globalRule.childrenInlineRules;
97
- this.p.preProccessing = defLinePreproccessing;
98
100
  this.br = new MDLineGrammarRule();
99
101
  this.br.matcher = [/^\n$/, '<br/>'];
100
102
  this.oli = new MDLineGrammarRule();
@@ -109,7 +111,13 @@ export class MDGrammar {
109
111
  this.audio.matcher = [/\[audio:([^\]]+)\]/, '<audio controls src="$1"></audio>'];
110
112
  this.video = new MDLineGrammarRule();
111
113
  this.video.matcher = [/\[video:([^\]]+)\]/, '<video controls src="$1"></video>'];
112
- this.globalRule.childrenLineRules = [this.header, this.quote, this.alignCenter, this.alignRight, this.audio, this.video, this.stars, this.br, this.p];
114
+ this.stars = new MDLineGrammarRule();
115
+ this.stars.matcher = [/^(\*{3,})/, '<p class="md-delim">$1</p>'];
116
+ this.p = new MDLineGrammarRule();
117
+ this.p.matcher = [/^(.*)$/, '<p>$1</p>'];
118
+ this.p.childrenInlineRules = this.globalRule.childrenInlineRules;
119
+ this.p.preProccessing = defLinePreproccessing;
120
+ this.globalRule.childrenLineRules = [this.header, this.quote, this.alignCenter, this.alignRight, this.tilde, this.warn, this.audio, this.video, this.stars, this.br, this.p];
113
121
  //
114
122
  // MULTILINE GRAMMAR RULES
115
123
  //
@@ -38,6 +38,8 @@ export declare class MDGrammar {
38
38
  readonly header: MDLineGrammarRule;
39
39
  readonly quote: MDLineGrammarRule;
40
40
  readonly alignRight: MDLineGrammarRule;
41
+ readonly tilde: MDLineGrammarRule;
42
+ readonly warn: MDLineGrammarRule;
41
43
  readonly alignCenter: MDLineGrammarRule;
42
44
  readonly stars: MDLineGrammarRule;
43
45
  readonly p: MDLineGrammarRule;
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.6",
4
+ "version": "1.1.7",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/Dittner/FlinkerMD.git"