|
1 | | -"use strict"; |
| 1 | +'use strict'; |
2 | 2 |
|
3 | 3 | const MarkdownIt = require('markdown-it'); |
4 | 4 | const fs = require('fs'); |
@@ -62,7 +62,7 @@ const Markdown = { |
62 | 62 | hookData.links.push({ |
63 | 63 | rel: 'prefetch stylesheet', |
64 | 64 | type: '', |
65 | | - href: `${nconf.get('relative_path')}/assets/plugins/nodebb-plugin-markdown/styles/${highlightTheme || 'default.css'}`, |
| 65 | + href: `${nconf.get('relative_path')}/assets/plugins/nodebb-plugin-ws-markdown/styles/${highlightTheme || 'default.css'}`, |
66 | 66 | }, { |
67 | 67 | rel: 'prefetch', |
68 | 68 | href: `${nconf.get('relative_path')}/assets/language/${meta.config.defaultLang || 'en-GB'}/markdown.json?${meta.config['cache-buster']}`, |
@@ -157,7 +157,7 @@ const Markdown = { |
157 | 157 | const env = await Markdown.beforeParse(data); |
158 | 158 | if (data && data.postData && data.postData.content && parser) { |
159 | 159 | // don't start lists with a + or - signs at the very start of a line |
160 | | - data.postData.content = data.postData.content.replace(/(?<=<p dir="auto">|\n|^)(?<symbol>-|\+)/gm, (m, symbol) => `\\${symbol}`); |
| 160 | + data.postData.content = data.postData.content.replace(/(?<=<p dir="auto">|\n|^)(?<symbol>-|\+)/gm, (m, symbol) => `\\${symbol}`); |
161 | 161 | data.postData.content = parser.render(data.postData.content, env || {}); |
162 | 162 | } |
163 | 163 | return Markdown.afterParse(data); |
@@ -330,15 +330,15 @@ const Markdown = { |
330 | 330 | }); |
331 | 331 | }); |
332 | 332 | }); |
333 | | - parser.use(require("markdown-it-mark")); |
334 | | - parser.use(require("markdown-it-ins")); |
335 | | - parser.use(require("markdown-it-abbr")); |
336 | | - parser.use(require("markdown-it-sup")); |
337 | | - parser.use(require("markdown-it-sub")); |
338 | | - parser.use(require("markdown-it-smartarrows")); |
339 | | - parser.use(require("markdown-it-inline-comments")); |
340 | | - parser.use(require("markdown-it-deflist")); |
341 | | - parser.use(require("markdown-it-hashtag")); |
| 333 | + parser.use(require('markdown-it-mark')); |
| 334 | + parser.use(require('markdown-it-ins')); |
| 335 | + parser.use(require('markdown-it-abbr')); |
| 336 | + parser.use(require('markdown-it-sup')); |
| 337 | + parser.use(require('markdown-it-sub')); |
| 338 | + parser.use(require('markdown-it-smartarrows')); |
| 339 | + parser.use(require('markdown-it-inline-comments')); |
| 340 | + parser.use(require('markdown-it-deflist')); |
| 341 | + parser.use(require('markdown-it-hashtag')); |
342 | 342 |
|
343 | 343 | // Update renderer to add some classes to all images |
344 | 344 | const renderImage = parser.renderer.rules.image || function (tokens, idx, options, env, self) { |
|
0 commit comments