@putout/processor-markdown 5.6.0 → 6.0.0
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const report = () => 'Avoid trailing whitespaces';
|
|
2
2
|
|
|
3
3
|
const fix = (heading, tree) => {
|
|
4
|
-
const latest = heading.children
|
|
4
|
+
const latest = heading.children.at(-1);
|
|
5
5
|
|
|
6
6
|
if (latest.type === 'text' && latest.value === ' ')
|
|
7
7
|
heading.children = heading.children.slice(0, -1);
|
|
@@ -18,7 +18,7 @@ const traverse = (tree, {push}) => {
|
|
|
18
18
|
if (heading.type !== 'heading')
|
|
19
19
|
return;
|
|
20
20
|
|
|
21
|
-
const latest = heading.children
|
|
21
|
+
const latest = heading.children.at(-1);
|
|
22
22
|
|
|
23
23
|
if (latest.type === 'text' && / $/.test(latest.value))
|
|
24
24
|
push(heading);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@putout/processor-markdown",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
|
|
6
6
|
"description": "putout processor adds ability to parse markdown files and lint js snippets",
|
|
@@ -48,16 +48,16 @@
|
|
|
48
48
|
"madrun": "^8.0.1",
|
|
49
49
|
"nodemon": "^2.0.1",
|
|
50
50
|
"putout": "*",
|
|
51
|
-
"supertape": "^
|
|
51
|
+
"supertape": "^7.0.0"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
|
-
"putout": ">=
|
|
54
|
+
"putout": ">=25"
|
|
55
55
|
},
|
|
56
|
-
"license": "MIT",
|
|
57
56
|
"engines": {
|
|
58
|
-
"node": ">=
|
|
57
|
+
"node": ">=16"
|
|
59
58
|
},
|
|
60
59
|
"publishConfig": {
|
|
61
60
|
"access": "public"
|
|
62
|
-
}
|
|
61
|
+
},
|
|
62
|
+
"license": "MIT"
|
|
63
63
|
}
|