@@ -30293,96 +30293,69 @@ function stringify$7(options) {
30293
30293
30294
30294
var remark = unified_1().use(remarkParse).use(remarkStringify).freeze();
30295
30295
30296
- const _args = [["remark@8.0.0","D:\\code\\prws\\tools\\node-lint-md-cli-rollup"]];
30297
- const _from = "remark@8.0.0";
30298
- const _id = "remark@8.0.0";
30299
- const _inBundle = false;
30300
- const _integrity = "sha512-K0PTsaZvJlXTl9DN6qYlvjTkqSZBFELhROZMrblm2rB+085flN84nz4g/BscKRMqDvhzlK1oQ/xnWQumdeNZYw==";
30301
- const _location = "/remark";
30302
- const _phantomChildren = {};
30303
- const _requested = {"type":"version","registry":true,"raw":"remark@8.0.0","name":"remark","escapedName":"remark","rawSpec":"8.0.0","saveSpec":null,"fetchSpec":"8.0.0"};
30304
- const _requiredBy = ["/"];
30305
- const _resolved = "https://registry.npmjs.org/remark/-/remark-8.0.0.tgz";
30306
- const _spec = "8.0.0";
30307
- const _where = "D:\\code\\prws\\tools\\node-lint-md-cli-rollup";
30308
- const author = {"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"http://wooorm.com"};
30309
- const bugs = {"url":"https://github.com/wooorm/remark/issues"};
30310
- const contributors = [{"name":"Titus Wormer","email":"tituswormer@gmail.com","url":"http://wooorm.com"}];
30311
- const dependencies = {"remark-parse":"^4.0.0","remark-stringify":"^4.0.0","unified":"^6.0.0"};
30296
+ const name = "remark";
30297
+ const version$1 = "8.0.0";
30312
30298
const description = "Markdown processor powered by plugins";
30313
- const files = ["index.js"];
30314
- const homepage = "http://remark.js.org";
30315
- const keywords = ["markdown","abstract","syntax","tree","ast","parse","stringify","process"];
30316
30299
const license = "MIT";
30317
- const name = "remark";
30318
- const repository = {"type":"git","url":"https://github.com/wooorm/remark/tree/master/packages/remark"};
30300
+ const keywords = ["markdown","abstract","syntax","tree","ast","parse","stringify","process"];
30301
+ const dependencies = {"remark-parse":"^4.0.0","remark-stringify":"^4.0.0","unified":"^6.0.0"};
30302
+ const homepage = "http://remark.js.org";
30303
+ const repository = "https://github.com/wooorm/remark/tree/master/packages/remark";
30304
+ const bugs = "https://github.com/wooorm/remark/issues";
30305
+ const author = "Titus Wormer <tituswormer@gmail.com> (http://wooorm.com)";
30306
+ const contributors = ["Titus Wormer <tituswormer@gmail.com> (http://wooorm.com)"];
30307
+ const files = ["index.js"];
30319
30308
const scripts = {};
30320
- const version$1 = "8.0.0";
30321
30309
const xo = false;
30310
+ const _resolved = "https://registry.npmjs.org/remark/-/remark-8.0.0.tgz";
30311
+ const _integrity = "sha512-K0PTsaZvJlXTl9DN6qYlvjTkqSZBFELhROZMrblm2rB+085flN84nz4g/BscKRMqDvhzlK1oQ/xnWQumdeNZYw==";
30312
+ const _from = "remark@8.0.0";
30322
30313
var _package = {
30323
- _args: _args,
30324
- _from: _from,
30325
- _id: _id,
30326
- _inBundle: _inBundle,
30327
- _integrity: _integrity,
30328
- _location: _location,
30329
- _phantomChildren: _phantomChildren,
30330
- _requested: _requested,
30331
- _requiredBy: _requiredBy,
30332
- _resolved: _resolved,
30333
- _spec: _spec,
30334
- _where: _where,
30335
- author: author,
30336
- bugs: bugs,
30337
- contributors: contributors,
30338
- dependencies: dependencies,
30314
+ name: name,
30315
+ version: version$1,
30339
30316
description: description,
30340
- files: files,
30341
- homepage: homepage,
30342
- keywords: keywords,
30343
30317
license: license,
30344
- name: name,
30318
+ keywords: keywords,
30319
+ dependencies: dependencies,
30320
+ homepage: homepage,
30345
30321
repository: repository,
30322
+ bugs: bugs,
30323
+ author: author,
30324
+ contributors: contributors,
30325
+ files: files,
30346
30326
scripts: scripts,
30347
- version: version$1,
30348
- xo: xo
30327
+ xo: xo,
30328
+ _resolved: _resolved,
30329
+ _integrity: _integrity,
30330
+ _from: _from
30349
30331
};
30350
30332
30351
30333
var _package$1 = Object.freeze({
30352
- _args: _args,
30353
- _from: _from,
30354
- _id: _id,
30355
- _inBundle: _inBundle,
30356
- _integrity: _integrity,
30357
- _location: _location,
30358
- _phantomChildren: _phantomChildren,
30359
- _requested: _requested,
30360
- _requiredBy: _requiredBy,
30361
- _resolved: _resolved,
30362
- _spec: _spec,
30363
- _where: _where,
30364
- author: author,
30365
- bugs: bugs,
30366
- contributors: contributors,
30367
- dependencies: dependencies,
30334
+ name: name,
30335
+ version: version$1,
30368
30336
description: description,
30369
- files: files,
30370
- homepage: homepage,
30371
- keywords: keywords,
30372
30337
license: license,
30373
- name: name,
30338
+ keywords: keywords,
30339
+ dependencies: dependencies,
30340
+ homepage: homepage,
30374
30341
repository: repository,
30342
+ bugs: bugs,
30343
+ author: author,
30344
+ contributors: contributors,
30345
+ files: files,
30375
30346
scripts: scripts,
30376
- version: version$1,
30377
30347
xo: xo,
30348
+ _resolved: _resolved,
30349
+ _integrity: _integrity,
30350
+ _from: _from,
30378
30351
default: _package
30379
30352
});
30380
30353
30381
30354
const name$1 = "node-lint-md-cli-rollup";
30382
30355
const description$1 = "remark packaged for node markdown linting";
30383
30356
const version$2 = "1.0.0";
30384
30357
const devDependencies = {"rollup":"^0.55.5","rollup-plugin-commonjs":"^8.0.2","rollup-plugin-json":"^2.3.1","rollup-plugin-node-resolve":"^3.4.0"};
30385
- const dependencies$1 = {"markdown-extensions":"^1.1.0","remark":"^8.0.0","remark-lint":"^6.0.2","remark-preset-lint-node":"^1.0.3 ","unified-args":"^6.0.0","unified-engine":"^5.1.0"};
30358
+ const dependencies$1 = {"markdown-extensions":"^1.1.0","remark":"^8.0.0","remark-lint":"^6.0.2","remark-preset-lint-node":"^1.1.0 ","unified-args":"^6.0.0","unified-engine":"^5.1.0"};
30386
30359
const scripts$1 = {"build":"rollup -c","build-node":"npm run build && cp dist/* .."};
30387
30360
var _package$2 = {
30388
30361
name: name$1,
@@ -32479,7 +32452,84 @@ function noInlinePadding(tree, file) {
32479
32452
}
32480
32453
}
32481
32454
32455
+ var remarkLintMaximumLineLength = unifiedLintRule('remark-lint:maximum-line-length', maximumLineLength);
32456
+
32482
32457
var start$6 = unistUtilPosition.start;
32458
+ var end$4 = unistUtilPosition.end;
32459
+
32460
+ function maximumLineLength(tree, file, pref) {
32461
+ var style = typeof pref === 'number' && !isNaN(pref) ? pref : 80;
32462
+ var content = String(file);
32463
+ var lines = content.split(/\r?\n/);
32464
+ var length = lines.length;
32465
+ var index = -1;
32466
+ var lineLength;
32467
+
32468
+ unistUtilVisit(tree, ['heading', 'table', 'code', 'definition'], ignore);
32469
+ unistUtilVisit(tree, ['link', 'image', 'inlineCode'], inline);
32470
+
32471
+ /* Iterate over every line, and warn for violating lines. */
32472
+ while (++index < length) {
32473
+ lineLength = lines[index].length;
32474
+
32475
+ if (lineLength > style) {
32476
+ file.message('Line must be at most ' + style + ' characters', {
32477
+ line: index + 1,
32478
+ column: lineLength + 1
32479
+ });
32480
+ }
32481
+ }
32482
+
32483
+ /* Finally, whitelist some inline spans, but only if they occur at or after
32484
+ * the wrap. However, when they do, and there’s white-space after it, they
32485
+ * are not whitelisted. */
32486
+ function inline(node, pos, parent) {
32487
+ var next = parent.children[pos + 1];
32488
+ var initial;
32489
+ var final;
32490
+
32491
+ /* istanbul ignore if - Nothing to whitelist when generated. */
32492
+ if (unistUtilGenerated(node)) {
32493
+ return
32494
+ }
32495
+
32496
+ initial = start$6(node);
32497
+ final = end$4(node);
32498
+
32499
+ /* No whitelisting when starting after the border, or ending before it. */
32500
+ if (initial.column > style || final.column < style) {
32501
+ return
32502
+ }
32503
+
32504
+ /* No whitelisting when there’s white-space after
32505
+ * the link. */
32506
+ if (
32507
+ next &&
32508
+ start$6(next).line === initial.line &&
32509
+ (!next.value || /^(.+?[ \t].+?)/.test(next.value))
32510
+ ) {
32511
+ return
32512
+ }
32513
+
32514
+ whitelist(initial.line - 1, final.line);
32515
+ }
32516
+
32517
+ function ignore(node) {
32518
+ /* istanbul ignore else - Hard to test, as we only run this case on `position: true` */
32519
+ if (!unistUtilGenerated(node)) {
32520
+ whitelist(start$6(node).line - 1, end$4(node).line);
32521
+ }
32522
+ }
32523
+
32524
+ /* Whitelist from `initial` to `final`, zero-based. */
32525
+ function whitelist(initial, final) {
32526
+ while (initial < final) {
32527
+ lines[initial++] = '';
32528
+ }
32529
+ }
32530
+ }
32531
+
32532
+ var start$7 = unistUtilPosition.start;
32483
32533
32484
32534
32485
32535
@@ -32502,7 +32552,7 @@ function noMultipleToplevelHeadings(tree, file, pref) {
32502
32552
node
32503
32553
);
32504
32554
} else {
32505
- duplicate = unistUtilStringifyPosition(start$6 (node));
32555
+ duplicate = unistUtilStringifyPosition(start$7 (node));
32506
32556
}
32507
32557
}
32508
32558
}
@@ -32664,8 +32714,8 @@ var rule$1 = unifiedLintRule;
32664
32714
32665
32715
var remarkLintRuleStyle = rule$1('remark-lint:rule-style', ruleStyle);
32666
32716
32667
- var start$7 = unistUtilPosition.start;
32668
- var end$4 = unistUtilPosition.end;
32717
+ var start$8 = unistUtilPosition.start;
32718
+ var end$5 = unistUtilPosition.end;
32669
32719
32670
32720
function ruleStyle(tree, file, pref) {
32671
32721
var contents = String(file);
@@ -32681,8 +32731,8 @@ function ruleStyle(tree, file, pref) {
32681
32731
unistUtilVisit(tree, 'thematicBreak', visitor);
32682
32732
32683
32733
function visitor(node) {
32684
- var initial = start$7 (node).offset;
32685
- var final = end$4 (node).offset;
32734
+ var initial = start$8 (node).offset;
32735
+ var final = end$5 (node).offset;
32686
32736
var rule;
32687
32737
32688
32738
if (!unistUtilGenerated(node)) {
@@ -32701,8 +32751,8 @@ function ruleStyle(tree, file, pref) {
32701
32751
32702
32752
var remarkLintTablePipes = unifiedLintRule('remark-lint:table-pipes', tablePipes);
32703
32753
32704
- var start$8 = unistUtilPosition.start;
32705
- var end$5 = unistUtilPosition.end;
32754
+ var start$9 = unistUtilPosition.start;
32755
+ var end$6 = unistUtilPosition.end;
32706
32756
32707
32757
var reasonStart = 'Missing initial pipe in table fence';
32708
32758
var reasonEnd = 'Missing final pipe in table fence';
@@ -32730,15 +32780,15 @@ function tablePipes(tree, file) {
32730
32780
cells = row.children;
32731
32781
head = cells[0];
32732
32782
tail = cells[cells.length - 1];
32733
- initial = contents.slice(start$8 (row).offset, start$8 (head).offset);
32734
- final = contents.slice(end$5 (tail).offset, end$5 (row).offset);
32783
+ initial = contents.slice(start$9 (row).offset, start$9 (head).offset);
32784
+ final = contents.slice(end$6 (tail).offset, end$6 (row).offset);
32735
32785
32736
32786
if (initial.indexOf('|') === -1) {
32737
- file.message(reasonStart, start$8 (row));
32787
+ file.message(reasonStart, start$9 (row));
32738
32788
}
32739
32789
32740
32790
if (final.indexOf('|') === -1) {
32741
- file.message(reasonEnd, end$5 (row));
32791
+ file.message(reasonEnd, end$6 (row));
32742
32792
}
32743
32793
}
32744
32794
}
@@ -32800,8 +32850,8 @@ var remarkLintCheckboxCharacterStyle = unifiedLintRule(
32800
32850
checkboxCharacterStyle
32801
32851
);
32802
32852
32803
- var start$9 = unistUtilPosition.start;
32804
- var end$6 = unistUtilPosition.end;
32853
+ var start$10 = unistUtilPosition.start;
32854
+ var end$7 = unistUtilPosition.end;
32805
32855
32806
32856
var checked = {x: true, X: true};
32807
32857
var unchecked = {' ': true, '\t': true};
@@ -32846,8 +32896,8 @@ function checkboxCharacterStyle(tree, file, pref) {
32846
32896
}
32847
32897
32848
32898
type = types[node.checked];
32849
- initial = start$9 (node).offset;
32850
- final = (node.children.length ? start$9 (node.children[0]) : end$6 (node)).offset;
32899
+ initial = start$10 (node).offset;
32900
+ final = (node.children.length ? start$10 (node.children[0]) : end$7 (node)).offset;
32851
32901
32852
32902
/* For a checkbox to be parsed, it must be followed by a white space. */
32853
32903
value = contents
@@ -32881,8 +32931,8 @@ function checkboxCharacterStyle(tree, file, pref) {
32881
32931
32882
32932
var remarkLintCodeBlockStyle = unifiedLintRule('remark-lint:code-block-style', codeBlockStyle);
32883
32933
32884
- var start$10 = unistUtilPosition.start;
32885
- var end$7 = unistUtilPosition.end;
32934
+ var start$11 = unistUtilPosition.start;
32935
+ var end$8 = unistUtilPosition.end;
32886
32936
32887
32937
var styles = {null: true, fenced: true, indented: true};
32888
32938
@@ -32915,8 +32965,8 @@ function codeBlockStyle(tree, file, pref) {
32915
32965
32916
32966
/* Get the style of `node`. */
32917
32967
function check(node) {
32918
- var initial = start$10 (node).offset;
32919
- var final = end$7 (node).offset;
32968
+ var initial = start$11 (node).offset;
32969
+ var final = end$8 (node).offset;
32920
32970
32921
32971
if (unistUtilGenerated(node)) {
32922
32972
return null
@@ -33111,8 +33161,8 @@ function strongMarker(tree, file, pref) {
33111
33161
33112
33162
var remarkLintTableCellPadding = unifiedLintRule('remark-lint:table-cell-padding', tableCellPadding);
33113
33163
33114
- var start$11 = unistUtilPosition.start;
33115
- var end$8 = unistUtilPosition.end;
33164
+ var start$12 = unistUtilPosition.start;
33165
+ var end$9 = unistUtilPosition.end;
33116
33166
33117
33167
var styles$1 = {null: true, padded: true, compact: true};
33118
33168
@@ -33160,8 +33210,8 @@ function tableCellPadding(tree, file, pref) {
33160
33210
next = cells[column + 1];
33161
33211
33162
33212
fence = contents.slice(
33163
- cell ? end$8 (cell).offset : start$11 (row).offset,
33164
- next ? start$11 (next).offset : end$8 (row).offset
33213
+ cell ? end$9 (cell).offset : start$12 (row).offset,
33214
+ next ? start$12 (next).offset : end$9 (row).offset
33165
33215
);
33166
33216
33167
33217
pos = fence.indexOf('|');
@@ -33238,7 +33288,7 @@ function tableCellPadding(tree, file, pref) {
33238
33288
}
33239
33289
33240
33290
function size(node) {
33241
- return end$8 (node).offset - start$11 (node).offset
33291
+ return end$9 (node).offset - start$12 (node).offset
33242
33292
}
33243
33293
33244
33294
var plugins$1 = [
@@ -33258,6 +33308,7 @@ var plugins$1 = [
33258
33308
remarkLintNoHeadingContentIndent,
33259
33309
remarkLintNoHeadingIndent,
33260
33310
remarkLintNoInlinePadding,
33311
+ remarkLintMaximumLineLength,
33261
33312
remarkLintNoMultipleToplevelHeadings,
33262
33313
remarkLintNoShellDollars,
33263
33314
remarkLintNoShortcutReferenceImage,
0 commit comments