flinker-markdown 1.1.15 → 1.1.17
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 +3 -1
- package/dist/types/md.d.ts +1 -0
- package/package.json +1 -1
package/dist/esm/md.js
CHANGED
|
@@ -58,6 +58,8 @@ export class MDGrammar {
|
|
|
58
58
|
this.em.childrenInlineRules = [this.strong, this.boldItalic, this.bold, this.italic];
|
|
59
59
|
this.code = new MDInlineGrammarRule();
|
|
60
60
|
this.code.matcher = [/``([^`]+)``/g, '<code>$1</code>'];
|
|
61
|
+
this.icon = new MDInlineGrammarRule();
|
|
62
|
+
this.icon.matcher = [/\[icon:([^\]]+)\]/g, '<span class="md-icon">$1</span>'];
|
|
61
63
|
this.figure = new MDInlineGrammarRule();
|
|
62
64
|
this.figure.matcher = [/\[img:([^, ]+), ?([^\]]+)\]/g, '<figure><img src="$1"/><figcaption>$2</figcaption></figure>'];
|
|
63
65
|
this.img = new MDInlineGrammarRule();
|
|
@@ -66,7 +68,7 @@ export class MDGrammar {
|
|
|
66
68
|
this.link.matcher = [/\[link:([^, \]]+),? *([^\]]*)\]/g, (line, url, descr) => {
|
|
67
69
|
return '<a href="' + url + '">' + (descr || url) + '</a>';
|
|
68
70
|
}];
|
|
69
|
-
this.globalRule.childrenInlineRules = [this.code, this.figure, this.img, this.link, this.sub, this.sup, this.strong, this.boldItalic, this.bold, this.em, this.italic];
|
|
71
|
+
this.globalRule.childrenInlineRules = [this.code, this.figure, this.img, this.link, this.icon, this.sub, this.sup, this.strong, this.boldItalic, this.bold, this.em, this.italic];
|
|
70
72
|
//
|
|
71
73
|
// LINE GRAMMAR RULES
|
|
72
74
|
//
|
package/dist/types/md.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ export declare class MDGrammar {
|
|
|
32
32
|
readonly boldItalic: MDInlineGrammarRule;
|
|
33
33
|
readonly em: MDInlineGrammarRule;
|
|
34
34
|
readonly code: MDInlineGrammarRule;
|
|
35
|
+
readonly icon: MDInlineGrammarRule;
|
|
35
36
|
readonly figure: MDInlineGrammarRule;
|
|
36
37
|
readonly img: MDInlineGrammarRule;
|
|
37
38
|
readonly link: MDInlineGrammarRule;
|
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.17",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/Dittner/FlinkerMD.git"
|