diff --git a/test/emphasis-markers.md b/test/emphasis-markers.md new file mode 100644 index 00000000..6a8c5be5 --- /dev/null +++ b/test/emphasis-markers.md @@ -0,0 +1,21 @@ +# Emphasis Markers + +Text to _set_ the **preferences**. + +This is *bad* {MD049} + +This `is +also` *bad* {MD049} + +This `is +also +very` *bad* {MD049} + +This is __bad__ {MD050} + +This `is +also` __bad__ {MD050} + +This `is +also +very` __bad__ {MD050} diff --git a/test/snapshots/markdownlint-test-scenarios.js.md b/test/snapshots/markdownlint-test-scenarios.js.md index 98ee1b3c..6458576e 100644 --- a/test/snapshots/markdownlint-test-scenarios.js.md +++ b/test/snapshots/markdownlint-test-scenarios.js.md @@ -9010,6 +9010,157 @@ Generated by [AVA](https://avajs.dev). `, } +## emphasis-markers.md + +> Snapshot 1 + + { + errors: [ + { + errorContext: null, + errorDetail: 'Expected: underscore; Actual: asterisk', + errorRange: [ + 9, + 5, + ], + fixInfo: { + deleteCount: 5, + editColumn: 9, + insertText: '_bad_', + }, + lineNumber: 5, + ruleDescription: 'Emphasis style should be consistent', + ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md049', + ruleNames: [ + 'MD049', + 'emphasis-style', + ], + }, + { + errorContext: null, + errorDetail: 'Expected: underscore; Actual: asterisk', + errorRange: [ + 7, + 5, + ], + fixInfo: { + deleteCount: 5, + editColumn: 7, + insertText: '_bad_', + }, + lineNumber: 8, + ruleDescription: 'Emphasis style should be consistent', + ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md049', + ruleNames: [ + 'MD049', + 'emphasis-style', + ], + }, + { + errorContext: null, + errorDetail: 'Expected: underscore; Actual: asterisk', + errorRange: [ + 7, + 5, + ], + fixInfo: { + deleteCount: 5, + editColumn: 7, + insertText: '_bad_', + }, + lineNumber: 12, + ruleDescription: 'Emphasis style should be consistent', + ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md049', + ruleNames: [ + 'MD049', + 'emphasis-style', + ], + }, + { + errorContext: null, + errorDetail: 'Expected: asterisk; Actual: underscore', + errorRange: [ + 9, + 7, + ], + fixInfo: { + deleteCount: 7, + editColumn: 9, + insertText: '**bad**', + }, + lineNumber: 14, + ruleDescription: 'Strong style should be consistent', + ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md050', + ruleNames: [ + 'MD050', + 'strong-style', + ], + }, + { + errorContext: null, + errorDetail: 'Expected: asterisk; Actual: underscore', + errorRange: [ + 7, + 7, + ], + fixInfo: { + deleteCount: 7, + editColumn: 7, + insertText: '**bad**', + }, + lineNumber: 17, + ruleDescription: 'Strong style should be consistent', + ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md050', + ruleNames: [ + 'MD050', + 'strong-style', + ], + }, + { + errorContext: null, + errorDetail: 'Expected: asterisk; Actual: underscore', + errorRange: [ + 7, + 7, + ], + fixInfo: { + deleteCount: 7, + editColumn: 7, + insertText: '**bad**', + }, + lineNumber: 21, + ruleDescription: 'Strong style should be consistent', + ruleInformation: 'https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md050', + ruleNames: [ + 'MD050', + 'strong-style', + ], + }, + ], + fixed: `# Emphasis Markers␊ + ␊ + Text to _set_ the **preferences**.␊ + ␊ + This is _bad_ {MD049}␊ + ␊ + This \`is␊ + also\` _bad_ {MD049}␊ + ␊ + This \`is␊ + also␊ + very\` _bad_ {MD049}␊ + ␊ + This is **bad** {MD050}␊ + ␊ + This \`is␊ + also\` **bad** {MD050}␊ + ␊ + This \`is␊ + also␊ + very\` **bad** {MD050}␊ + `, + } + ## emphasis-not-heading-in-blockquote.md > Snapshot 1 diff --git a/test/snapshots/markdownlint-test-scenarios.js.snap b/test/snapshots/markdownlint-test-scenarios.js.snap index 68c4cff3..ab4979f2 100644 Binary files a/test/snapshots/markdownlint-test-scenarios.js.snap and b/test/snapshots/markdownlint-test-scenarios.js.snap differ