markdownlint-rule-search-replace
Advanced tools
Comparing version 1.0.8 to 1.0.9
{ | ||
"name": "markdownlint-rule-search-replace", | ||
"version": "1.0.8", | ||
"version": "1.0.9", | ||
"description": "A custom markdownlint rule for search and replaces", | ||
@@ -5,0 +5,0 @@ "main": "rule.js", |
@@ -76,3 +76,4 @@ # markdownlint-rule-search-replace | ||
Note, `search` and `searchPattern` are interchangeable. The property `search` is used if both are supplied. | ||
Properties are case-sensitive and are in camel case.\ | ||
**Note:** `search` and `searchPattern` are interchangeable. The property `search` is used if both are supplied. | ||
@@ -79,0 +80,0 @@ In patterns, to escape characters use `\\`. For example, |
@@ -178,2 +178,6 @@ // @ts-check | ||
for (const rule of rules) { | ||
if (!rule.search && !rule.searchPattern) { | ||
throw new Error("Provide either `search` or `searchPattern` option."); | ||
} | ||
const regex = rule.search | ||
@@ -180,0 +184,0 @@ ? new RegExp(escapeForRegExp(rule.search), "g") |
14680
202
193