@@ -206,28 +206,28 @@ function wrap(middleware, callback) {
206
206
}
207
207
}
208
208
209
- function stringifyPosition(value) {
209
+ function stringifyPosition$1 (value) {
210
210
if (!value || typeof value !== 'object') {
211
211
return ''
212
212
}
213
213
if ('position' in value || 'type' in value) {
214
- return position(value.position)
214
+ return position$1 (value.position)
215
215
}
216
216
if ('start' in value || 'end' in value) {
217
- return position(value)
217
+ return position$1 (value)
218
218
}
219
219
if ('line' in value || 'column' in value) {
220
- return point$2 (value)
220
+ return point$3 (value)
221
221
}
222
222
return ''
223
223
}
224
- function point$2 (point) {
225
- return index(point && point.line) + ':' + index(point && point.column)
224
+ function point$3 (point) {
225
+ return index$1 (point && point.line) + ':' + index$1 (point && point.column)
226
226
}
227
- function position(pos) {
228
- return point$2 (pos && pos.start) + '-' + point$2 (pos && pos.end)
227
+ function position$1 (pos) {
228
+ return point$3 (pos && pos.start) + '-' + point$3 (pos && pos.end)
229
229
}
230
- function index(value) {
230
+ function index$1 (value) {
231
231
return value && typeof value === 'number' ? value : 1
232
232
}
233
233
@@ -265,7 +265,7 @@ let VFileMessage$1 = class VFileMessage extends Error {
265
265
position.start = place;
266
266
}
267
267
}
268
- this.name = stringifyPosition(place) || '1:1';
268
+ this.name = stringifyPosition$1 (place) || '1:1';
269
269
this.message = typeof reason === 'object' ? reason.message : reason;
270
270
this.stack = '';
271
271
if (typeof reason === 'object' && reason.stack) {
@@ -7289,7 +7289,7 @@ function compiler(options) {
7289
7289
handler.call(context, undefined, tail[0]);
7290
7290
}
7291
7291
tree.position = {
7292
- start: point$1 (
7292
+ start: point$2 (
7293
7293
events.length > 0
7294
7294
? events[0][1].start
7295
7295
: {
@@ -7298,7 +7298,7 @@ function compiler(options) {
7298
7298
offset: 0
7299
7299
}
7300
7300
),
7301
- end: point$1 (
7301
+ end: point$2 (
7302
7302
events.length > 0
7303
7303
? events[events.length - 2][1].end
7304
7304
: {
@@ -7448,7 +7448,7 @@ function compiler(options) {
7448
7448
this.stack.push(node);
7449
7449
this.tokenStack.push([token, errorHandler]);
7450
7450
node.position = {
7451
- start: point$1 (token.start)
7451
+ start: point$2 (token.start)
7452
7452
};
7453
7453
return node
7454
7454
}
@@ -7467,7 +7467,7 @@ function compiler(options) {
7467
7467
'Cannot close `' +
7468
7468
token.type +
7469
7469
'` (' +
7470
- stringifyPosition({
7470
+ stringifyPosition$1 ({
7471
7471
start: token.start,
7472
7472
end: token.end
7473
7473
}) +
@@ -7481,7 +7481,7 @@ function compiler(options) {
7481
7481
handler.call(this, token, open[0]);
7482
7482
}
7483
7483
}
7484
- node.position.end = point$1 (token.end);
7484
+ node.position.end = point$2 (token.end);
7485
7485
return node
7486
7486
}
7487
7487
function resume() {
@@ -7564,7 +7564,7 @@ function compiler(options) {
7564
7564
if (!tail || tail.type !== 'text') {
7565
7565
tail = text();
7566
7566
tail.position = {
7567
- start: point$1 (token.start)
7567
+ start: point$2 (token.start)
7568
7568
};
7569
7569
node.children.push(tail);
7570
7570
}
@@ -7573,13 +7573,13 @@ function compiler(options) {
7573
7573
function onexitdata(token) {
7574
7574
const tail = this.stack.pop();
7575
7575
tail.value += this.sliceSerialize(token);
7576
- tail.position.end = point$1 (token.end);
7576
+ tail.position.end = point$2 (token.end);
7577
7577
}
7578
7578
function onexitlineending(token) {
7579
7579
const context = this.stack[this.stack.length - 1];
7580
7580
if (getData('atHardBreak')) {
7581
7581
const tail = context.children[context.children.length - 1];
7582
- tail.position.end = point$1 (token.end);
7582
+ tail.position.end = point$2 (token.end);
7583
7583
setData('atHardBreak');
7584
7584
return
7585
7585
}
@@ -7699,7 +7699,7 @@ function compiler(options) {
7699
7699
}
7700
7700
const tail = this.stack.pop();
7701
7701
tail.value += value;
7702
- tail.position.end = point$1 (token.end);
7702
+ tail.position.end = point$2 (token.end);
7703
7703
}
7704
7704
function onexitautolinkprotocol(token) {
7705
7705
onexitdata.call(this, token);
@@ -7821,7 +7821,7 @@ function compiler(options) {
7821
7821
}
7822
7822
}
7823
7823
}
7824
- function point$1 (d) {
7824
+ function point$2 (d) {
7825
7825
return {
7826
7826
line: d.line,
7827
7827
column: d.column,
@@ -7868,14 +7868,14 @@ function defaultOnError(left, right) {
7868
7868
'Cannot close `' +
7869
7869
left.type +
7870
7870
'` (' +
7871
- stringifyPosition({
7871
+ stringifyPosition$1 ({
7872
7872
start: left.start,
7873
7873
end: left.end
7874
7874
}) +
7875
7875
'): a different token (`' +
7876
7876
right.type +
7877
7877
'`, ' +
7878
- stringifyPosition({
7878
+ stringifyPosition$1 ({
7879
7879
start: right.start,
7880
7880
end: right.end
7881
7881
}) +
@@ -7886,7 +7886,7 @@ function defaultOnError(left, right) {
7886
7886
'Cannot close document, a token (`' +
7887
7887
right.type +
7888
7888
'`, ' +
7889
- stringifyPosition({
7889
+ stringifyPosition$1 ({
7890
7890
start: right.start,
7891
7891
end: right.end
7892
7892
}) +
@@ -12767,9 +12767,9 @@ const remarkLintListItemBulletIndent = lintRule(
12767
12767
);
12768
12768
var remarkLintListItemBulletIndent$1 = remarkLintListItemBulletIndent;
12769
12769
12770
- const pointStart = point('start');
12771
- const pointEnd = point('end');
12772
- function point(type) {
12770
+ const pointStart = point$1 ('start');
12771
+ const pointEnd = point$1 ('end');
12772
+ function point$1 (type) {
12773
12773
return point
12774
12774
function point(node) {
12775
12775
const point = (node && node.position && node.position[type]) || {};
@@ -13396,7 +13396,7 @@ const remarkLintNoDuplicateDefinitions = lintRule(
13396
13396
node
13397
13397
);
13398
13398
}
13399
- map[identifier] = stringifyPosition(pointStart(node));
13399
+ map[identifier] = stringifyPosition$1 (pointStart(node));
13400
13400
}
13401
13401
});
13402
13402
}
@@ -15965,7 +15965,7 @@ const remarkLintNoMultipleToplevelHeadings = lintRule(
15965
15965
node
15966
15966
);
15967
15967
} else {
15968
- duplicate = stringifyPosition(pointStart(node));
15968
+ duplicate = stringifyPosition$1 (pointStart(node));
15969
15969
}
15970
15970
}
15971
15971
});
@@ -19546,7 +19546,11 @@ getDefaultExportFromCjs(constants);
19546
19546
var re$1 = {exports: {}};
19547
19547
19548
19548
(function (module, exports) {
19549
- const { MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH } = constants;
19549
+ const {
19550
+ MAX_SAFE_COMPONENT_LENGTH,
19551
+ MAX_SAFE_BUILD_LENGTH,
19552
+ MAX_LENGTH,
19553
+ } = constants;
19550
19554
const debug = debug_1;
19551
19555
exports = module.exports = {};
19552
19556
const re = exports.re = [];
@@ -19557,7 +19561,7 @@ var re$1 = {exports: {}};
19557
19561
const LETTERDASHNUMBER = '[a-zA-Z0-9-]';
19558
19562
const safeRegexReplacements = [
19559
19563
['\\s', 1],
19560
- ['\\d', MAX_SAFE_COMPONENT_LENGTH ],
19564
+ ['\\d', MAX_LENGTH ],
19561
19565
[LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH],
19562
19566
];
19563
19567
const makeSafeRegex = (value) => {
@@ -21049,6 +21053,31 @@ const settings = {
21049
21053
};
21050
21054
const remarkPresetLintNode = { plugins, settings };
21051
21055
21056
+ function stringifyPosition(value) {
21057
+ if (!value || typeof value !== 'object') {
21058
+ return ''
21059
+ }
21060
+ if ('position' in value || 'type' in value) {
21061
+ return position(value.position)
21062
+ }
21063
+ if ('start' in value || 'end' in value) {
21064
+ return position(value)
21065
+ }
21066
+ if ('line' in value || 'column' in value) {
21067
+ return point(value)
21068
+ }
21069
+ return ''
21070
+ }
21071
+ function point(point) {
21072
+ return index(point && point.line) + ':' + index(point && point.column)
21073
+ }
21074
+ function position(pos) {
21075
+ return point(pos && pos.start) + '-' + point(pos && pos.end)
21076
+ }
21077
+ function index(value) {
21078
+ return value && typeof value === 'number' ? value : 1
21079
+ }
21080
+
21052
21081
class VFileMessage extends Error {
21053
21082
constructor(causeOrReason, optionsOrParentOrPlace, origin) {
21054
21083
super();
@@ -22006,7 +22035,7 @@ function createAncestorsLines(state, ancestors) {
22006
22035
typeof value.name === 'string'
22007
22036
? value.name
22008
22037
: undefined;
22009
- const position = stringifyPosition(node.position);
22038
+ const position = stringifyPosition$1 (node.position);
22010
22039
lines.push(
22011
22040
' at ' +
22012
22041
state.yellow +
@@ -22096,7 +22125,7 @@ function createMessageLine(state, message) {
22096
22125
}
22097
22126
const place = message.place || message.position;
22098
22127
const row = [
22099
- stringifyPosition(place),
22128
+ stringifyPosition$1 (place),
22100
22129
(label === 'error' ? state.red : state.yellow) + label + state.defaultColor,
22101
22130
formatReason(state, reason),
22102
22131
message.ruleId || '',
0 commit comments