Add MD037 with tests, improve handling of line numbers for inlines.

This commit is contained in:
David Anson 2015-04-15 17:50:01 -07:00
parent bd7e712728
commit b85e53a9c4
6 changed files with 108 additions and 21 deletions

View file

@ -498,7 +498,7 @@ module.exports.badFileSync = function badFileSync(test) {
};
module.exports.readme = function readme(test) {
test.expect(86);
test.expect(88);
var tagToRules = {};
rules.forEach(function forRule(rule) {
rule.tags.forEach(function forTag(tag) {
@ -555,7 +555,7 @@ module.exports.readme = function readme(test) {
};
module.exports.doc = function doc(test) {
test.expect(131);
test.expect(135);
fs.readFile("doc/Rules.md", shared.utf8Encoding,
function readFile(err, contents) {
test.ifError(err);

View file

@ -0,0 +1,35 @@
Line with *Normal emphasis*
Line with **Normal strong**
Line with _Normal emphasis_
Line with __Normal strong__
Broken * emphasis * with spaces in {MD037}
Broken ** strong ** with spaces in {MD037}
Broken _ emphasis _ with spaces in {MD037}
Broken __ strong __ with spaces in {MD037}
Mixed *ok emphasis* and * broken emphasis * {MD037}
Mixed **ok strong** and ** broken strong ** {MD037}
Mixed _ok emphasis_ and _ broken emphasis _ {MD037}
Mixed __ok strong__ and __ broken strong __ {MD037}
Mixed *ok emphasis* **ok strong** * broken emphasis * {MD037}
Multiple * broken emphasis * _ broken emphasis _ {MD037}
One-sided *broken emphasis * {MD037}
One-sided * broken emphasis* {MD037}
Don't _flag on _words with underscores before them.
The same goes for words* with asterisks* after them.