Reimplement MD038/no-space-in-code to handle multi-backtick strings (fixes #46).

This commit is contained in:
David Anson 2017-02-18 22:56:06 -08:00
parent 00171da565
commit 31206f9387
3 changed files with 51 additions and 13 deletions

View file

@ -6,6 +6,10 @@
` codespan element with spaces inside ` {MD038}
empty `` codespan element
single space ` ` codespan element {MD038}
`,`, `.`
`,`, `code`
@ -21,3 +25,33 @@ text `code` text `anything` code `end`
text `anything` code `code` text `end`
text `anything` text `anything` code `anything` `code`
text ``code`` text ``code`` text
text `` code`` text {MD038}
text ``code `` text {MD038}
text ```code``` text ```code``` text
text ```code``` text `` code`` text {MD038}
text ```code``` text ``code `` text {MD038}
``embedded ` backtick`` text `code`
`backslash does not escape \` backtick`
`` ` `` text `code`
` `` ` text `code`
``` ` leading space allowed for backtick``` text `code`
``` ` multiple leading spaces not allowed``` text `code` {MD038}
``trailing space allowed for backtick ` `` text `code`
``multiple trailing spaces not allowed ` `` text `code` {MD038}
`` ` leading and trailing space allowed for backtick ` `` text `code`