mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 14:00:13 +01:00
Add MD050/strong-style (fixes #150).
This commit is contained in:
parent
6294ad3ef0
commit
ab9e5875a2
23 changed files with 255 additions and 19 deletions
|
|
@ -4,3 +4,4 @@ demo/markdownlint-browser.min.js
|
||||||
demo/markdownlint-rule-helpers-browser.js
|
demo/markdownlint-rule-helpers-browser.js
|
||||||
demo/markdownlint-rule-helpers-browser.min.js
|
demo/markdownlint-rule-helpers-browser.min.js
|
||||||
example/typescript/type-check.js
|
example/typescript/type-check.js
|
||||||
|
test-repos/
|
||||||
|
|
|
||||||
|
|
@ -102,6 +102,7 @@ playground for learning and exploring.
|
||||||
* **[MD046](doc/Rules.md#md046)** *code-block-style* - Code block style
|
* **[MD046](doc/Rules.md#md046)** *code-block-style* - Code block style
|
||||||
* **[MD047](doc/Rules.md#md047)** *single-trailing-newline* - Files should end with a single newline character
|
* **[MD047](doc/Rules.md#md047)** *single-trailing-newline* - Files should end with a single newline character
|
||||||
* **[MD048](doc/Rules.md#md048)** *code-fence-style* - Code fence style
|
* **[MD048](doc/Rules.md#md048)** *code-fence-style* - Code fence style
|
||||||
|
* **[MD050](doc/Rules.md#md050)** *strong-style* - Strong style should be consistent
|
||||||
|
|
||||||
<!-- markdownlint-restore -->
|
<!-- markdownlint-restore -->
|
||||||
|
|
||||||
|
|
@ -125,7 +126,7 @@ rules at once.
|
||||||
* **blockquote** - MD027, MD028
|
* **blockquote** - MD027, MD028
|
||||||
* **bullet** - MD004, MD005, MD006, MD007, MD032
|
* **bullet** - MD004, MD005, MD006, MD007, MD032
|
||||||
* **code** - MD014, MD031, MD038, MD040, MD046, MD048
|
* **code** - MD014, MD031, MD038, MD040, MD046, MD048
|
||||||
* **emphasis** - MD036, MD037
|
* **emphasis** - MD036, MD037, MD050
|
||||||
* **hard_tab** - MD010
|
* **hard_tab** - MD010
|
||||||
* **headers** - MD001, MD002, MD003, MD018, MD019, MD020, MD021, MD022,
|
* **headers** - MD001, MD002, MD003, MD018, MD019, MD020, MD021, MD022,
|
||||||
MD023, MD024, MD025, MD026, MD036, MD041, MD043
|
MD023, MD024, MD025, MD026, MD036, MD041, MD043
|
||||||
|
|
|
||||||
|
|
@ -190,6 +190,21 @@ module.exports.fencedCodeBlockStyleFor =
|
||||||
return "backtick";
|
return "backtick";
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
/**
|
||||||
|
* Return the string representation of a emphasis or strong markup character.
|
||||||
|
*
|
||||||
|
* @param {string} markup Emphasis or strong string.
|
||||||
|
* @returns {string} String representation.
|
||||||
|
*/
|
||||||
|
module.exports.emphasisOrStrongStyleFor =
|
||||||
|
function emphasisOrStrongStyleFor(markup) {
|
||||||
|
switch (markup[0]) {
|
||||||
|
case "*":
|
||||||
|
return "asterisk";
|
||||||
|
default:
|
||||||
|
return "underscore";
|
||||||
|
}
|
||||||
|
};
|
||||||
/**
|
/**
|
||||||
* Return the number of characters of indent for a token.
|
* Return the number of characters of indent for a token.
|
||||||
*
|
*
|
||||||
|
|
@ -4024,6 +4039,36 @@ module.exports = {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ "../lib/md050.js":
|
||||||
|
/*!***********************!*\
|
||||||
|
!*** ../lib/md050.js ***!
|
||||||
|
\***********************/
|
||||||
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
// @ts-check
|
||||||
|
|
||||||
|
var _a = __webpack_require__(/*! ../helpers */ "../helpers/helpers.js"), addErrorDetailIf = _a.addErrorDetailIf, emphasisOrStrongStyleFor = _a.emphasisOrStrongStyleFor, forEachInlineChild = _a.forEachInlineChild;
|
||||||
|
module.exports = {
|
||||||
|
"names": ["MD050", "strong-style"],
|
||||||
|
"description": "Strong style should be consistent",
|
||||||
|
"tags": ["emphasis"],
|
||||||
|
"function": function MD050(params, onError) {
|
||||||
|
var expectedStyle = String(params.config.style || "consistent");
|
||||||
|
forEachInlineChild(params, "strong_open", function (token) {
|
||||||
|
var lineNumber = token.lineNumber, markup = token.markup;
|
||||||
|
var markupStyle = emphasisOrStrongStyleFor(markup);
|
||||||
|
if (expectedStyle === "consistent") {
|
||||||
|
expectedStyle = markupStyle;
|
||||||
|
}
|
||||||
|
addErrorDetailIf(onError, lineNumber, expectedStyle, markupStyle);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ "../lib/rules.js":
|
/***/ "../lib/rules.js":
|
||||||
|
|
@ -4082,7 +4127,8 @@ var rules = [
|
||||||
__webpack_require__(/*! ./md045 */ "../lib/md045.js"),
|
__webpack_require__(/*! ./md045 */ "../lib/md045.js"),
|
||||||
__webpack_require__(/*! ./md046 */ "../lib/md046.js"),
|
__webpack_require__(/*! ./md046 */ "../lib/md046.js"),
|
||||||
__webpack_require__(/*! ./md047 */ "../lib/md047.js"),
|
__webpack_require__(/*! ./md047 */ "../lib/md047.js"),
|
||||||
__webpack_require__(/*! ./md048 */ "../lib/md048.js")
|
__webpack_require__(/*! ./md048 */ "../lib/md048.js"),
|
||||||
|
__webpack_require__(/*! ./md050 */ "../lib/md050.js")
|
||||||
];
|
];
|
||||||
rules.forEach(function (rule) {
|
rules.forEach(function (rule) {
|
||||||
var name = rule.names[0].toLowerCase();
|
var name = rule.names[0].toLowerCase();
|
||||||
|
|
|
||||||
30
doc/Rules.md
30
doc/Rules.md
|
|
@ -1911,3 +1911,33 @@ The configured list style can be a specific symbol to use (backtick, tilde), or
|
||||||
can require that usage be consistent within the document.
|
can require that usage be consistent within the document.
|
||||||
|
|
||||||
Rationale: Consistent formatting makes it easier to understand a document.
|
Rationale: Consistent formatting makes it easier to understand a document.
|
||||||
|
|
||||||
|
<a name="md050"></a>
|
||||||
|
|
||||||
|
## MD050 - Strong style should be consistent
|
||||||
|
|
||||||
|
Tags: emphasis
|
||||||
|
|
||||||
|
Aliases: strong-style
|
||||||
|
|
||||||
|
Parameters: style ("consistent", "asterisk", "underscore"; default "consistent")
|
||||||
|
|
||||||
|
This rule is triggered when the symbols used in the document for strong do not
|
||||||
|
match the configured strong style:
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
**Text**
|
||||||
|
__Text__
|
||||||
|
```
|
||||||
|
|
||||||
|
To fix this issue, use the configured strong style throughout the document:
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
**Text**
|
||||||
|
**Text**
|
||||||
|
```
|
||||||
|
|
||||||
|
The configured strong style can be a specific symbol to use ("asterisk",
|
||||||
|
"underscore"), or can require that usage be consistent within the document.
|
||||||
|
|
||||||
|
Rationale: Consistent formatting makes it easier to understand a document.
|
||||||
|
|
|
||||||
|
|
@ -181,6 +181,22 @@ module.exports.fencedCodeBlockStyleFor =
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the string representation of a emphasis or strong markup character.
|
||||||
|
*
|
||||||
|
* @param {string} markup Emphasis or strong string.
|
||||||
|
* @returns {string} String representation.
|
||||||
|
*/
|
||||||
|
module.exports.emphasisOrStrongStyleFor =
|
||||||
|
function emphasisOrStrongStyleFor(markup) {
|
||||||
|
switch (markup[0]) {
|
||||||
|
case "*":
|
||||||
|
return "asterisk";
|
||||||
|
default:
|
||||||
|
return "underscore";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the number of characters of indent for a token.
|
* Return the number of characters of indent for a token.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
28
lib/md050.js
Normal file
28
lib/md050.js
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
// @ts-check
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
const { addErrorDetailIf, emphasisOrStrongStyleFor, forEachInlineChild } =
|
||||||
|
require("../helpers");
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
"names": [ "MD050", "strong-style" ],
|
||||||
|
"description": "Strong style should be consistent",
|
||||||
|
"tags": [ "emphasis" ],
|
||||||
|
"function": function MD050(params, onError) {
|
||||||
|
let expectedStyle = String(params.config.style || "consistent");
|
||||||
|
forEachInlineChild(params, "strong_open", (token) => {
|
||||||
|
const { lineNumber, markup } = token;
|
||||||
|
const markupStyle = emphasisOrStrongStyleFor(markup);
|
||||||
|
if (expectedStyle === "consistent") {
|
||||||
|
expectedStyle = markupStyle;
|
||||||
|
}
|
||||||
|
addErrorDetailIf(
|
||||||
|
onError,
|
||||||
|
lineNumber,
|
||||||
|
expectedStyle,
|
||||||
|
markupStyle
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
@ -50,7 +50,8 @@ const rules = [
|
||||||
require("./md045"),
|
require("./md045"),
|
||||||
require("./md046"),
|
require("./md046"),
|
||||||
require("./md047"),
|
require("./md047"),
|
||||||
require("./md048")
|
require("./md048"),
|
||||||
|
require("./md050")
|
||||||
];
|
];
|
||||||
rules.forEach((rule) => {
|
rules.forEach((rule) => {
|
||||||
const name = rule.names[0].toLowerCase();
|
const name = rule.names[0].toLowerCase();
|
||||||
|
|
|
||||||
|
|
@ -248,5 +248,11 @@
|
||||||
"MD048": {
|
"MD048": {
|
||||||
// Code fence style
|
// Code fence style
|
||||||
"style": "consistent"
|
"style": "consistent"
|
||||||
|
},
|
||||||
|
|
||||||
|
// MD050/strong-style - Strong style should be consistent
|
||||||
|
"MD050": {
|
||||||
|
// Strong style should be consistent
|
||||||
|
"style": "consistent"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -224,4 +224,9 @@ MD047: true
|
||||||
# MD048/code-fence-style - Code fence style
|
# MD048/code-fence-style - Code fence style
|
||||||
MD048:
|
MD048:
|
||||||
# Code fence style
|
# Code fence style
|
||||||
|
style: "consistent"
|
||||||
|
|
||||||
|
# MD050/strong-style - Strong style should be consistent
|
||||||
|
MD050:
|
||||||
|
# Strong style should be consistent
|
||||||
style: "consistent"
|
style: "consistent"
|
||||||
|
|
@ -396,6 +396,20 @@ rules.forEach(function forRule(rule) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
|
case "MD050":
|
||||||
|
scheme.properties = {
|
||||||
|
"style": {
|
||||||
|
"description": "Strong style should be consistent",
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"consistent",
|
||||||
|
"asterisk",
|
||||||
|
"underscore"
|
||||||
|
],
|
||||||
|
"default": "consistent"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
custom = false;
|
custom = false;
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -1439,6 +1439,48 @@
|
||||||
},
|
},
|
||||||
"additionalProperties": false
|
"additionalProperties": false
|
||||||
},
|
},
|
||||||
|
"MD050": {
|
||||||
|
"description": "MD050/strong-style - Strong style should be consistent",
|
||||||
|
"type": [
|
||||||
|
"boolean",
|
||||||
|
"object"
|
||||||
|
],
|
||||||
|
"default": true,
|
||||||
|
"properties": {
|
||||||
|
"style": {
|
||||||
|
"description": "Strong style should be consistent",
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"consistent",
|
||||||
|
"asterisk",
|
||||||
|
"underscore"
|
||||||
|
],
|
||||||
|
"default": "consistent"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"additionalProperties": false
|
||||||
|
},
|
||||||
|
"strong-style": {
|
||||||
|
"description": "MD050/strong-style - Strong style should be consistent",
|
||||||
|
"type": [
|
||||||
|
"boolean",
|
||||||
|
"object"
|
||||||
|
],
|
||||||
|
"default": true,
|
||||||
|
"properties": {
|
||||||
|
"style": {
|
||||||
|
"description": "Strong style should be consistent",
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"consistent",
|
||||||
|
"asterisk",
|
||||||
|
"underscore"
|
||||||
|
],
|
||||||
|
"default": "consistent"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"additionalProperties": false
|
||||||
|
},
|
||||||
"headings": {
|
"headings": {
|
||||||
"description": "headings - MD001, MD002, MD003, MD018, MD019, MD020, MD021, MD022, MD023, MD024, MD025, MD026, MD036, MD041, MD043",
|
"description": "headings - MD001, MD002, MD003, MD018, MD019, MD020, MD021, MD022, MD023, MD024, MD025, MD026, MD036, MD041, MD043",
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
|
|
@ -1535,7 +1577,7 @@
|
||||||
"default": true
|
"default": true
|
||||||
},
|
},
|
||||||
"emphasis": {
|
"emphasis": {
|
||||||
"description": "emphasis - MD036, MD037",
|
"description": "emphasis - MD036, MD037, MD050",
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": true
|
"default": true
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -85,4 +85,8 @@ markdownLint {MD044}
|
||||||
 {MD045}
|
 {MD045}
|
||||||
## Heading 10 {MD022}
|
## Heading 10 {MD022}
|
||||||
|
|
||||||
|
Strong __with__ underscore style
|
||||||
|
|
||||||
|
Strong **with** different style {MD050}
|
||||||
|
|
||||||
EOF {MD047}
|
EOF {MD047}
|
||||||
|
|
@ -9,7 +9,7 @@ Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore
|
||||||
eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt
|
eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt
|
||||||
in culpa qui officia deserunt mollit anim id est laborum.
|
in culpa qui officia deserunt mollit anim id est laborum.
|
||||||
|
|
||||||
__Section 1.1: another section {MD036}__
|
__Section 1.1: another section {MD036} {MD050}__
|
||||||
|
|
||||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
|
||||||
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
|
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
|
||||||
|
|
|
||||||
|
|
@ -6,5 +6,5 @@
|
||||||
[test *test* *test* test](www.test.com)
|
[test *test* *test* test](www.test.com)
|
||||||
[test *test* *test* *test* test](www.test.com)
|
[test *test* *test* *test* test](www.test.com)
|
||||||
[test **test** test](www.test.com)
|
[test **test** test](www.test.com)
|
||||||
[test __test__ test](www.test.com)
|
[test __test__ test](www.test.com) {MD050}
|
||||||
[this should not raise](www.shouldnotraise.com)
|
[this should not raise](www.shouldnotraise.com)
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ _[This long line is comprised of an emphasized link](https://example.com "This i
|
||||||
|
|
||||||
**[This long line is comprised of a bolded link](https://example.com "This is the long link's title")**
|
**[This long line is comprised of a bolded link](https://example.com "This is the long link's title")**
|
||||||
|
|
||||||
__[This long line is comprised of a bolded link](https://example.com "This is the long link's title")__
|
__[This long line is comprised of a bolded link {MD050}](https://example.com "This is the long link's title")__
|
||||||
|
|
||||||
_**[This long line is comprised of an emphasized and bolded link](https://example.com "This is the long link's title")**_
|
_**[This long line is comprised of an emphasized and bolded link](https://example.com "This is the long link's title")**_
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,13 @@ function lintTestRepo(t, globPatterns, configPath) {
|
||||||
|
|
||||||
test("https://github.com/eslint/eslint", (t) => {
|
test("https://github.com/eslint/eslint", (t) => {
|
||||||
const rootDir = "./test-repos/eslint-eslint";
|
const rootDir = "./test-repos/eslint-eslint";
|
||||||
const globPatterns = [ join(rootDir, "docs/**/*.md") ];
|
const globPatterns = [
|
||||||
|
join(rootDir, "docs/**/*.md"),
|
||||||
|
"!" + join(
|
||||||
|
rootDir,
|
||||||
|
"docs/rules/array-callback-return.md"
|
||||||
|
)
|
||||||
|
];
|
||||||
const configPath = join(rootDir, ".markdownlint.yml");
|
const configPath = join(rootDir, ".markdownlint.yml");
|
||||||
return lintTestRepo(t, globPatterns, configPath);
|
return lintTestRepo(t, globPatterns, configPath);
|
||||||
});
|
});
|
||||||
|
|
@ -134,7 +140,17 @@ if (existsSync(dotnetDocsDir)) {
|
||||||
const rootDir = dotnetDocsDir;
|
const rootDir = dotnetDocsDir;
|
||||||
const globPatterns = [
|
const globPatterns = [
|
||||||
join(rootDir, "**/*.md"),
|
join(rootDir, "**/*.md"),
|
||||||
"!" + join(rootDir, "samples/**/*.md")
|
"!" + join(rootDir, "samples/**/*.md"),
|
||||||
|
"!" + join(
|
||||||
|
rootDir,
|
||||||
|
"docs/framework/data/adonet/dataset-datatable-dataview" +
|
||||||
|
"/security-guidance.md"
|
||||||
|
),
|
||||||
|
"!" + join(rootDir, "docs/standard/native-interop/best-practices.md"),
|
||||||
|
"!" + join(
|
||||||
|
rootDir,
|
||||||
|
"docs/standard/serialization/binaryformatter-security-guide.md"
|
||||||
|
)
|
||||||
];
|
];
|
||||||
const configPath = join(rootDir, ".markdownlint.json");
|
const configPath = join(rootDir, ".markdownlint.json");
|
||||||
return lintTestRepo(t, globPatterns, configPath);
|
return lintTestRepo(t, globPatterns, configPath);
|
||||||
|
|
|
||||||
|
|
@ -492,8 +492,9 @@ test.cb("styleAll", (t) => {
|
||||||
"MD042": [ 81 ],
|
"MD042": [ 81 ],
|
||||||
"MD045": [ 85 ],
|
"MD045": [ 85 ],
|
||||||
"MD046": [ 49, 73, 77 ],
|
"MD046": [ 49, 73, 77 ],
|
||||||
"MD047": [ 88 ],
|
"MD047": [ 92 ],
|
||||||
"MD048": [ 77 ]
|
"MD048": [ 77 ],
|
||||||
|
"MD050": [ 90 ]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
|
|
@ -535,8 +536,9 @@ test.cb("styleRelaxed", (t) => {
|
||||||
"MD042": [ 81 ],
|
"MD042": [ 81 ],
|
||||||
"MD045": [ 85 ],
|
"MD045": [ 85 ],
|
||||||
"MD046": [ 49, 73, 77 ],
|
"MD046": [ 49, 73, 77 ],
|
||||||
"MD047": [ 88 ],
|
"MD047": [ 92 ],
|
||||||
"MD048": [ 77 ]
|
"MD048": [ 77 ],
|
||||||
|
"MD050": [ 90 ]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
|
|
@ -837,7 +839,7 @@ test.cb("customFileSystemAsync", (t) => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
test.cb("readme", (t) => {
|
test.cb("readme", (t) => {
|
||||||
t.plan(115);
|
t.plan(117);
|
||||||
const tagToRules = {};
|
const tagToRules = {};
|
||||||
rules.forEach(function forRule(rule) {
|
rules.forEach(function forRule(rule) {
|
||||||
rule.tags.forEach(function forTag(tag) {
|
rule.tags.forEach(function forTag(tag) {
|
||||||
|
|
@ -913,7 +915,7 @@ test.cb("readme", (t) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
test.cb("rules", (t) => {
|
test.cb("rules", (t) => {
|
||||||
t.plan(336);
|
t.plan(344);
|
||||||
fs.readFile("doc/Rules.md", "utf8",
|
fs.readFile("doc/Rules.md", "utf8",
|
||||||
(err, contents) => {
|
(err, contents) => {
|
||||||
t.falsy(err);
|
t.falsy(err);
|
||||||
|
|
@ -1566,7 +1568,7 @@ test.cb("configBadFilePromise", (t) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
test("allBuiltInRulesHaveValidUrl", (t) => {
|
test("allBuiltInRulesHaveValidUrl", (t) => {
|
||||||
t.plan(132);
|
t.plan(135);
|
||||||
rules.forEach(function forRule(rule) {
|
rules.forEach(function forRule(rule) {
|
||||||
t.truthy(rule.information);
|
t.truthy(rule.information);
|
||||||
t.true(Object.getPrototypeOf(rule.information) === URL.prototype);
|
t.true(Object.getPrototypeOf(rule.information) === URL.prototype);
|
||||||
|
|
|
||||||
|
|
@ -8,10 +8,10 @@ This paragraph *nests both _kinds_ of emphasis* marker.
|
||||||
|
|
||||||
This paragraph *nests both __kinds__ of emphasis* marker.
|
This paragraph *nests both __kinds__ of emphasis* marker.
|
||||||
|
|
||||||
This paragraph **nests both __kinds__ of emphasis** marker.
|
This paragraph **nests both __kinds__ of emphasis** marker. {MD050}
|
||||||
|
|
||||||
This paragraph _nests both *kinds* of emphasis_ marker.
|
This paragraph _nests both *kinds* of emphasis_ marker.
|
||||||
|
|
||||||
This paragraph _nests both **kinds** of emphasis_ marker.
|
This paragraph _nests both **kinds** of emphasis_ marker. {MD050}
|
||||||
|
|
||||||
This paragraph __nests both **kinds** of emphasis__ marker.
|
This paragraph __nests both **kinds** of emphasis__ marker. {MD050}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
# Heading
|
# Heading
|
||||||
|
|
||||||
|
<!-- markdownlint-disable-file strong-style -->
|
||||||
|
|
||||||
Line with *Normal emphasis*
|
Line with *Normal emphasis*
|
||||||
|
|
||||||
Line with **Normal strong**
|
Line with **Normal strong**
|
||||||
|
|
|
||||||
6
test/strong_style_asterisk.json
Normal file
6
test/strong_style_asterisk.json
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"default": true,
|
||||||
|
"MD050": {
|
||||||
|
"style": "asterisk"
|
||||||
|
}
|
||||||
|
}
|
||||||
5
test/strong_style_asterisk.md
Normal file
5
test/strong_style_asterisk.md
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
# Strong style asterisk
|
||||||
|
|
||||||
|
This is **fine**
|
||||||
|
|
||||||
|
This is __not__ {MD050}
|
||||||
6
test/strong_style_underscore.json
Normal file
6
test/strong_style_underscore.json
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"default": true,
|
||||||
|
"MD050": {
|
||||||
|
"style": "underscore"
|
||||||
|
}
|
||||||
|
}
|
||||||
5
test/strong_style_underscore.md
Normal file
5
test/strong_style_underscore.md
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
# Strong style underscore
|
||||||
|
|
||||||
|
This is __fine__
|
||||||
|
|
||||||
|
This is **not** {MD050}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue