confluence-cli 2.1.5 → 2.1.6
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/lib/html-to-markdown.js +4 -1
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/lib/html-to-markdown.js
CHANGED
|
@@ -40,7 +40,10 @@ function htmlToMarkdown(html) {
|
|
|
40
40
|
markdown = markdown.replace(
|
|
41
41
|
/<pre[^>]*>\s*<code([^>]*)>([\s\S]*?)<\/code>\s*<\/pre>/g,
|
|
42
42
|
(_, codeAttrs, body) => {
|
|
43
|
-
|
|
43
|
+
// Stop the language token at whitespace so multi-class conventions
|
|
44
|
+
// like Prism / highlight.js (`class="language-js hljs"`) don't leak
|
|
45
|
+
// sibling class names into the fence info string.
|
|
46
|
+
const langMatch = codeAttrs.match(/class="language-([^"\s]+)/);
|
|
44
47
|
const lang = langMatch ? langMatch[1] : '';
|
|
45
48
|
const trimmed = body.replace(/^\n+|\n+$/g, '');
|
|
46
49
|
// Size against entity-decoded content: the entity-decode pass runs
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "confluence-cli",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.6",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "confluence-cli",
|
|
9
|
-
"version": "2.1.
|
|
9
|
+
"version": "2.1.6",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"axios": "^1.15.0",
|