AssertEqual SyntaxOf('a'), 'mkdLink'
AssertEqual SyntaxOf('foo'), 'mkdInlineURL'
+Given markdown;
+[https://domain.tld](https://domain.com) not_a_link
+
+Execute (link with url title):
+ AssertEqual SyntaxOf('https://domain.tld'), 'mkdInlineURL'
+ AssertEqual SyntaxOf('https://domain.com'), 'mkdInlineURL'
+ AssertNotEqual SyntaxOf('not_a_link'), 'mkdInlineURL'
+
# Code Blocks
Given markdown;
Execute (not code block in escaped code tag):
AssertNotEqual SyntaxOf('a'), 'mkdCode'
+# Code quotes
+
+Given markdown;
+`a`
+
+Execute (code in code quotes):
+ AssertEqual SyntaxOf('a'), 'mkdCode'
+
+Given markdown;
+`a\` b `c\` d
+
+Execute (code quotes not escaped ending with backslash):
+ AssertEqual SyntaxOf('a\'), 'mkdCode'
+ AssertNotEqual SyntaxOf('b'), 'mkdCode'
+ AssertEqual SyntaxOf('c\'), 'mkdCode'
+ AssertNotEqual SyntaxOf('d'), 'mkdCode'
+
+Given markdown;
+``a\`` b ``c`\`1`` d
+
+Execute (double code quotes not escaped ending with backslash):
+ AssertEqual SyntaxOf('a\'), 'mkdCode'
+ AssertNotEqual SyntaxOf('b'), 'mkdCode'
+ AssertEqual SyntaxOf('c`\\`1'), 'mkdCode'
+ AssertNotEqual SyntaxOf('d'), 'mkdCode'
+
# Math
Given markdown;
###### h6
Execute (atx headers):
- AssertEqual SyntaxOf('# h1 space'), 'htmlH1'
- AssertEqual SyntaxOf('#h1 nospace'), 'htmlH1'
- AssertEqual SyntaxOf('# h1 2 spaces'), 'htmlH1'
- AssertEqual SyntaxOf('# h1 trailing hash #'), 'htmlH1'
- AssertEqual SyntaxOf('## h2 space'), 'htmlH2'
- AssertEqual SyntaxOf('##h2 nospace'), 'htmlH2'
- AssertEqual SyntaxOf('## h2 trailing hash ##'), 'htmlH2'
- AssertEqual SyntaxOf('### h3 space'), 'htmlH3'
- AssertEqual SyntaxOf('###h3 nospace'), 'htmlH3'
- AssertEqual SyntaxOf('### h3 trailing hash ###'), 'htmlH3'
- AssertEqual SyntaxOf('#### h4'), 'htmlH4'
- AssertEqual SyntaxOf('##### h5'), 'htmlH5'
- AssertEqual SyntaxOf('###### h6'), 'htmlH6'
+ AssertEqual SyntaxOf(' h1 space'), 'htmlH1'
+ AssertEqual SyntaxOf('h1 nospace'), 'htmlH1'
+ AssertEqual SyntaxOf(' h1 2 spaces'), 'htmlH1'
+ AssertEqual SyntaxOf(' h1 trailing hash '), 'htmlH1'
+ AssertEqual SyntaxOf(' h2 space'), 'htmlH2'
+ AssertEqual SyntaxOf('h2 nospace'), 'htmlH2'
+ AssertEqual SyntaxOf(' h2 trailing hash '), 'htmlH2'
+ AssertEqual SyntaxOf(' h3 space'), 'htmlH3'
+ AssertEqual SyntaxOf('h3 nospace'), 'htmlH3'
+ AssertEqual SyntaxOf(' h3 trailing hash '), 'htmlH3'
+ AssertEqual SyntaxOf(' h4'), 'htmlH4'
+ AssertEqual SyntaxOf(' h5'), 'htmlH5'
+ AssertEqual SyntaxOf(' h6'), 'htmlH6'
Given markdown;
# h1 before h2
# h1 after h2
Execute (atx headers relative positions):
- AssertEqual SyntaxOf('# h1 before h2'), 'htmlH1'
- AssertEqual SyntaxOf('## h2 between h1s'), 'htmlH2'
- AssertEqual SyntaxOf('# h1 after h2'), 'htmlH1'
+ AssertEqual SyntaxOf(' h1 before h2'), 'htmlH1'
+ AssertEqual SyntaxOf(' h2 between h1s'), 'htmlH2'
+ AssertEqual SyntaxOf(' h1 after h2'), 'htmlH1'
Given markdown;
setex h1
Execute (mixed atx and setex headers):
AssertEqual SyntaxOf('setex h1 before atx'), 'htmlH1'
AssertEqual SyntaxOf('==================='), 'htmlH1'
- AssertEqual SyntaxOf('## atx h2'), 'htmlH2'
- AssertEqual SyntaxOf('### atx h3'), 'htmlH3'
- AssertEqual SyntaxOf('# atx h1'), 'htmlH1'
+ AssertEqual SyntaxOf(' atx h2'), 'htmlH2'
+ AssertEqual SyntaxOf(' atx h3'), 'htmlH3'
+ AssertEqual SyntaxOf(' atx h1'), 'htmlH1'
AssertEqual SyntaxOf('setex h2'), 'htmlH2'
AssertEqual SyntaxOf('------------------'), 'htmlH2'