flinker-markdown 1.1.12 → 1.1.14
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 +5 -3
- package/dist/types/md.d.ts +1 -0
- package/package.json +1 -1
package/dist/esm/md.js
CHANGED
|
@@ -113,14 +113,16 @@ export class MDGrammar {
|
|
|
113
113
|
res += '></video>';
|
|
114
114
|
return res;
|
|
115
115
|
};
|
|
116
|
-
this.video.matcher = [
|
|
116
|
+
this.video.matcher = [/^\[video:([^, \]]+),? *([^\]]*)\]/, videoReplacer];
|
|
117
|
+
this.horRule = new MDLineGrammarRule();
|
|
118
|
+
this.horRule.matcher = [/^---$/, '<hr/>'];
|
|
117
119
|
this.stars = new MDLineGrammarRule();
|
|
118
120
|
this.stars.matcher = [/^(\*{3,})/, '<p class="md-delim">$1</p>'];
|
|
119
121
|
this.p = new MDLineGrammarRule();
|
|
120
122
|
this.p.matcher = [/^(.*)$/, '<p>$1</p>'];
|
|
121
123
|
this.p.childrenInlineRules = this.globalRule.childrenInlineRules;
|
|
122
124
|
this.p.preProccessing = defLinePreproccessing;
|
|
123
|
-
this.globalRule.childrenLineRules = [this.header, this.quote, this.alignCenter, this.alignRight, this.tilde, this.audio, this.video, this.stars, this.br, this.p];
|
|
125
|
+
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];
|
|
124
126
|
//
|
|
125
127
|
// MULTILINE GRAMMAR RULES
|
|
126
128
|
//
|
|
@@ -150,7 +152,7 @@ export class MDGrammar {
|
|
|
150
152
|
this.div.startMatcher = [/^```([a-zA-Z]+) */, '<div class="$1"><div>'];
|
|
151
153
|
this.div.endMatcher = [/^``` *$/, '</div></div>'];
|
|
152
154
|
this.div.childrenInlineRules = this.globalRule.childrenInlineRules;
|
|
153
|
-
this.div.childrenLineRules = [this.quote, this.alignCenter, this.alignRight, this.tilde, this.br, this.p];
|
|
155
|
+
this.div.childrenLineRules = [this.quote, this.alignCenter, this.alignRight, this.tilde, this.horRule, this.br, this.p];
|
|
154
156
|
this.div.childrenMultilineRules = [this.div];
|
|
155
157
|
this.globalRule.childrenMultilineRules = [this.ol, this.ul, this.table, this.div];
|
|
156
158
|
}
|
package/dist/types/md.d.ts
CHANGED
|
@@ -40,6 +40,7 @@ export declare class MDGrammar {
|
|
|
40
40
|
readonly alignRight: MDLineGrammarRule;
|
|
41
41
|
readonly tilde: MDLineGrammarRule;
|
|
42
42
|
readonly alignCenter: MDLineGrammarRule;
|
|
43
|
+
readonly horRule: MDLineGrammarRule;
|
|
43
44
|
readonly stars: MDLineGrammarRule;
|
|
44
45
|
readonly p: MDLineGrammarRule;
|
|
45
46
|
readonly br: 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.
|
|
4
|
+
"version": "1.1.14",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/Dittner/FlinkerMD.git"
|