@diplodoc/yfmlint 1.3.1 → 1.3.3

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/build/index.js CHANGED
@@ -21587,7 +21587,7 @@ var yfm002 = {
21587
21587
  // src/rules/yfm003.ts
21588
21588
  var REASON_DESCRIPTION = {
21589
21589
  "file-not-found": "File does not exist in the project",
21590
- "missing-in-toc": "File exists but is not declared in toc",
21590
+ "missing-in-toc": "File is not declared in toc",
21591
21591
  "missing-in-toc-and-file-not-found": "File does not exist and is not declared in toc"
21592
21592
  };
21593
21593
  var yfm003 = {
@@ -21605,7 +21605,7 @@ var yfm003 = {
21605
21605
  }).forEach((inline) => {
21606
21606
  var _a;
21607
21607
  (_a = inline.children) == null ? void 0 : _a.filter((child) => {
21608
- return child.type === "link_open";
21608
+ return child && child.type === "link_open";
21609
21609
  }).forEach((link) => {
21610
21610
  const linkToken = link;
21611
21611
  const reason = linkToken.attrGet("YFM003");
@@ -21614,10 +21614,10 @@ var yfm003 = {
21614
21614
  const context = [
21615
21615
  `Unreachable link: "${linkToken.attrGet("href")}"`,
21616
21616
  reasonDescription,
21617
- `Line: ${link.line}`
21617
+ `Line: ${link.line || inline.line}`
21618
21618
  ].filter(Boolean).join("; ");
21619
21619
  onError({
21620
- lineNumber: link.lineNumber,
21620
+ lineNumber: link.lineNumber || inline.lineNumber,
21621
21621
  context
21622
21622
  });
21623
21623
  }