mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-01-06 16:08:49 +01:00
Update new rule MD059/descriptive-link-text for project-level consistency.
This commit is contained in:
parent
b8374ec5d2
commit
571c2353ea
23 changed files with 466 additions and 383 deletions
|
|
@ -1,6 +1,6 @@
|
|||
// @ts-check
|
||||
|
||||
import { addErrorContext, newLineRe } from "../helpers/helpers.cjs";
|
||||
import { addErrorContext } from "../helpers/helpers.cjs";
|
||||
import { getDescendantsByType } from "../helpers/micromark-helpers.cjs";
|
||||
import { filterByTypesCached } from "./cache.mjs";
|
||||
|
||||
|
|
@ -32,7 +32,7 @@ export default {
|
|||
const endSpaces = endCount > 0;
|
||||
// Check if safe to remove 1-space padding
|
||||
const removePadding = startSpaces && endSpaces && startPadding && endPadding && !startBacktick && !endBacktick;
|
||||
const context = codeText.text.replace(newLineRe, "\n");
|
||||
const context = codeText.text;
|
||||
// If extra space at start, report violation
|
||||
if (startSpaces) {
|
||||
const startColumn = (removePadding ? startPadding : startData).startColumn;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue