DESCRIPTION

This test is about excluding HTML “anchors” from output, that is, all and only markdown lines that consist of validly-formed HTML tag <a name="some name">.

Note that this file includes invalid HTML tags.

TESTS


TEST INVALID TAGS...

RESULT the line above joins 2 malformed tags <a name=></a> <a name= ></a>


TEST <a> tag without name attribute

RESULT the line above is <a></a> <a ></a> <a href=“”></a>.

Smart quotes in href=“” are not an accident. They replace straight quotes in the input markdown because mdview does not pass through HTML tags. Therefore straight quotes are considered text and replaced by smart quotes.


TEST <a> tags that are followed by non-white space...

suffix suffix suffix

RESULT the line above joins 3 variations of <a name></a>suffix


TEST valid anchors: show nothing until the next RESULT

RESULT the line above is “TEST ... until the next RESULT”


TEST anchors in code blocks: show them as code

    <a name="show me"></a>
<a name="show me"></a>

RESULT there are 2 <a name="show me"> lines above


PASS if all RESULT lines above are true