@diplodoc/transform 4.7.1 → 4.7.2
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/dist/css/print.css.map +1 -1
- package/dist/css/yfm.css +4 -2
- package/dist/css/yfm.css.map +3 -3
- package/dist/css/yfm.min.css +1 -1
- package/dist/css/yfm.min.css.map +3 -3
- package/dist/js/yfm.js +39 -39
- package/dist/js/yfm.js.map +1 -1
- package/dist/js/yfm.min.js +1 -1
- package/dist/js/yfm.min.js.map +1 -1
- package/lib/plugins/anchors/collect.js +2 -1
- package/lib/plugins/anchors/collect.js.map +1 -1
- package/lib/plugins/block-anchor/index.d.ts +1 -1
- package/lib/plugins/block-anchor/index.js +1 -2
- package/lib/plugins/block-anchor/index.js.map +1 -1
- package/lib/yfmlint/index.d.ts +1 -1
- package/lib/yfmlint/markdownlint-custom-rule/yfm007.js.map +1 -1
- package/package.json +4 -10
- package/src/.eslintrc.js +16 -0
- package/src/js/term/index.ts +2 -2
- package/src/transform/index.ts +1 -1
- package/src/transform/liquid/substitutions.ts +1 -1
- package/src/transform/log.ts +1 -1
- package/src/transform/md.ts +1 -1
- package/src/transform/plugins/anchors/collect.ts +3 -4
- package/src/transform/plugins/anchors/index.ts +1 -1
- package/src/transform/plugins/block-anchor/index.ts +2 -2
- package/src/transform/plugins/file/file.ts +2 -2
- package/src/transform/plugins/images/index.ts +2 -2
- package/src/transform/plugins/includes/index.ts +1 -1
- package/src/transform/plugins/links/index.ts +2 -2
- package/src/transform/plugins/video/index.ts +1 -1
- package/src/transform/utilsFS.ts +1 -1
- package/src/transform/yfmlint/index.ts +1 -1
- package/src/transform/yfmlint/markdownlint-custom-rule/yfm007.ts +15 -14
- package/src/.eslintrc +0 -10
|
@@ -12,7 +12,7 @@ import type Renderer from 'markdown-it/lib/renderer';
|
|
|
12
12
|
|
|
13
13
|
import type {VideoFullOptions, VideoPluginOptions, VideoToken} from './types';
|
|
14
14
|
import {parseVideoUrl} from './parsers';
|
|
15
|
-
import {
|
|
15
|
+
import {VideoService, defaults} from './const';
|
|
16
16
|
|
|
17
17
|
// eslint-disable-next-line valid-jsdoc
|
|
18
18
|
/**
|
package/src/transform/utilsFS.ts
CHANGED
|
@@ -2,7 +2,7 @@ import {readFileSync, statSync} from 'fs';
|
|
|
2
2
|
import type {Dictionary} from 'lodash';
|
|
3
3
|
import escapeRegExp from 'lodash/escapeRegExp';
|
|
4
4
|
|
|
5
|
-
import {parse, resolve,
|
|
5
|
+
import {join, parse, resolve, sep} from 'path';
|
|
6
6
|
|
|
7
7
|
import liquid from './liquid';
|
|
8
8
|
import {StateCore} from './typings';
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
import {errorToString, getLogLevel} from './utils';
|
|
19
19
|
import {Options} from './typings';
|
|
20
20
|
import type {Dictionary} from 'lodash';
|
|
21
|
-
import {
|
|
21
|
+
import {LogLevels, Logger} from '../log';
|
|
22
22
|
import {yfm009} from './markdownlint-custom-rule/yfm009';
|
|
23
23
|
|
|
24
24
|
const defaultLintRules = [yfm001, yfm002, yfm003, yfm004, yfm005, yfm006, yfm007, yfm008, yfm009];
|
|
@@ -9,20 +9,21 @@ export const yfm007: Rule = {
|
|
|
9
9
|
if (!config) {
|
|
10
10
|
return;
|
|
11
11
|
}
|
|
12
|
-
params.tokens.forEach(
|
|
13
|
-
el
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
12
|
+
params.tokens.forEach(
|
|
13
|
+
(el) =>
|
|
14
|
+
el.children
|
|
15
|
+
?.filter((token) => {
|
|
16
|
+
return token.type === '__yfm_lint';
|
|
17
|
+
})
|
|
18
|
+
.forEach((term) => {
|
|
19
|
+
// @ts-expect-error bad markdownlint typings
|
|
20
|
+
if (term.attrGet('YFM007')) {
|
|
21
|
+
onError({
|
|
22
|
+
lineNumber: term.lineNumber,
|
|
23
|
+
context: term.line,
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
}),
|
|
26
27
|
);
|
|
27
28
|
},
|
|
28
29
|
};
|