bajo-markdown 1.0.2 → 1.0.3

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/bajo/start.js CHANGED
@@ -27,10 +27,12 @@ async function start () {
27
27
  }
28
28
  const marked = new Marked(options)
29
29
  marked.use({ renderer, extensions: [emoji] })
30
+ /*
30
31
  marked.Renderer.prototype.paragraph = (text) => {
31
32
  if (text.startsWith('<c:')) return text + '\n' // for weibu component
32
33
  return '<p>' + text + '</p>'
33
34
  }
35
+ */
34
36
 
35
37
  this.instance = marked
36
38
  }
package/lib/renderer.js CHANGED
@@ -1,6 +1,10 @@
1
1
  async function renderer () {
2
2
  const config = this.config
3
3
  return {
4
+ paragraph ({ text }) {
5
+ if (text.startsWith('&lt;c:')) return text + '\n' // for weibu component
6
+ return '<p>' + text + '</p>'
7
+ },
4
8
  table (header, body) {
5
9
  return `
6
10
  <table class="${config.renderer.tableClass}">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bajo-markdown",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "Markdown support for Bajo Framework",
5
5
  "main": "index.js",
6
6
  "scripts": {