flinker-markdown 1.1.10 → 1.1.11

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/README.md CHANGED
@@ -21,7 +21,7 @@ import { div, TextProps } from "flinker-dom"
21
21
  import { md, MDGrammar, MDParser } from "flinker-markdown"
22
22
 
23
23
  interface MarkdownProps extends TextProps {
24
- absolutePathPrefix?: string
24
+ absolutePathPrefix?: string //it will be added to the relative path of a media file [<a>, <img>, <audio>, <video>]
25
25
  mode: 'md' | 'rawText' | 'rawHtml'
26
26
  }
27
27
 
package/dist/esm/md.js CHANGED
@@ -59,11 +59,11 @@ export class MDGrammar {
59
59
  this.code = new MDInlineGrammarRule();
60
60
  this.code.matcher = [/``([^`]+)``/g, '<code>$1</code>'];
61
61
  this.figure = new MDInlineGrammarRule();
62
- this.figure.matcher = [/\[img:([^, ]+), ?([^\]]+)\]/gm, '<figure><img src="$1"/><figcaption>$2</figcaption></figure>'];
62
+ this.figure.matcher = [/\[img:([^, ]+), ?([^\]]+)\]/g, '<figure><img src="$1"/><figcaption>$2</figcaption></figure>'];
63
63
  this.img = new MDInlineGrammarRule();
64
- this.img.matcher = [/\[img:([^\]]+)\]/gm, '<img src="$1"/>'];
64
+ this.img.matcher = [/\[img:([^\]]+)\]/g, '<img src="$1"/>'];
65
65
  this.link = new MDInlineGrammarRule();
66
- this.link.matcher = [/\[link:([^, ]+),? ?([^\]]*)\]/, (line, url, descr) => {
66
+ this.link.matcher = [/\[link:([^, \]]+),? *([^\]]*)\]/g, (line, url, descr) => {
67
67
  return '<a href="' + url + '">' + (descr || url) + '</a>';
68
68
  }];
69
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];
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.10",
4
+ "version": "1.1.11",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/Dittner/FlinkerMD.git"