@magic/transmute 0.0.48 → 0.0.49

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
@@ -247,7 +247,10 @@ update dependencies
247
247
  ##### 0.0.48
248
248
  update dependencies
249
249
 
250
- ##### 0.0.49 - unreleased
250
+ ##### 0.0.49
251
+ update dependencies
252
+
253
+ ##### 0.0.50 - unreleased
251
254
  ...
252
255
 
253
256
  [npm-image]: https://img.shields.io/npm/v/@magic/transmute.svg
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magic/transmute",
3
- "version": "0.0.48",
3
+ "version": "0.0.49",
4
4
  "author": "Wizards & Witches",
5
5
  "homepage": "https://magic.github.io/transmute",
6
6
  "license": "AGPL-3.0",
@@ -40,19 +40,19 @@
40
40
  "@magic/entities": "0.0.7",
41
41
  "@magic/log": "0.1.10",
42
42
  "@magic/types": "0.1.16",
43
- "marked": "3.0.2",
43
+ "marked": "4.0.6",
44
44
  "posthtml-parser": "0.10.1",
45
- "prettier": "2.3.2"
45
+ "prettier": "2.5.1"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@magic-modules/git-badges": "0.0.11",
49
49
  "@magic-modules/light-switch": "0.0.10",
50
50
  "@magic-modules/no-spy": "0.0.6",
51
51
  "@magic-modules/pre": "0.0.11",
52
- "@magic-themes/docs": "0.0.13",
53
- "@magic/core": "0.0.128",
54
- "@magic/format": "0.0.28",
55
- "@magic/test": "0.1.73"
52
+ "@magic-themes/docs": "0.0.14",
53
+ "@magic/core": "0.0.132",
54
+ "@magic/format": "0.0.32",
55
+ "@magic/test": "0.1.76"
56
56
  },
57
57
  "keywords": [
58
58
  "magic",
package/src/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import marked from 'marked'
1
+ import { marked } from 'marked'
2
2
  import { parser } from 'posthtml-parser'
3
3
 
4
4
  import is from '@magic/types'
@@ -1,19 +1,16 @@
1
- import marked from 'marked'
2
- import helpers from 'marked/src/helpers.js'
1
+ import { Renderer } from 'marked'
3
2
 
4
- const { escape } = helpers
3
+ export const markdown = new Renderer()
5
4
 
6
- export const markdown = new marked.Renderer()
5
+ /* overwrite builtin markdown functions to use @magic modules */
7
6
 
8
- markdown.code = (code, infostring, escaped) => {
7
+ markdown.code = (code, infostring) => {
9
8
  let lang = (infostring || '').match(/\S*/)[0]
10
9
 
11
10
  if (!lang) {
12
11
  return `<Pre>${code}</Pre>\n`
13
12
  }
14
13
 
15
- lang = escape(lang, true)
16
-
17
14
  return `<Pre class="${lang}">${code}</Pre>`
18
15
  }
19
16
 
@@ -24,7 +21,7 @@ markdown.link = (href, title, text) => {
24
21
  return text
25
22
  }
26
23
 
27
- let out = `<Link to="${escape(href)}"`
24
+ let out = `<Link to="${href}"`
28
25
 
29
26
  if (title) {
30
27
  out += ` title="${title}"`