Hash :
09ae8609
Author :
Date :
2016-12-07T23:56:47
Handle images more like links. Remove MD_SPAN_IMG_DETAIL::alt. Instead, the contents of the image is propagated to the renderer via MD_RENDERER::text() callback. * This fixes handling of entities inside the image text (issue #4). * It simplifies parsing and, more importantly, it better distingusshes what is responsibility of parser or renderer respectively. * This allows more flexibility on renderers side. Renderer who do not * really support images can just output the image content as any other text. The cost is a renderer into HTML (if it wants to render image contents into the attribute ALT of the IMG tag), has to handle images with more care. Typically such renderer has to track whether it is inside an image, and if so, then render span enter/leave as an empty string.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
# Coverage
This file is just a collection of unit tests not covered elsewhere.
Most notably regression tests, tests improving code coverage and other useful
things may drop here.
(However any tests requiring any additional command line option, like enabling
an extension, must be included in their respective files.)
## GitHub Issues
### [Issue 2](https://github.com/mity/md4c/issues/2)
Raw HTML block:
```````````````````````````````` example
<gi att1=tok1 att2=tok2>
.
<gi att1=tok1 att2=tok2>
````````````````````````````````
Inline:
```````````````````````````````` example
foo <gi att1=tok1 att2=tok2> bar
.
<p>foo <gi att1=tok1 att2=tok2> bar</p>
````````````````````````````````
Inline with a line break:
```````````````````````````````` example
foo <gi att1=tok1
att2=tok2> bar
.
<p>foo <gi att1=tok1
att2=tok2> bar</p>
````````````````````````````````
### [Issue 4](https://github.com/mity/md4c/issues/4)
```````````````````````````````` example

.
<p><img src="img.png" alt="alt text with entity ©" title="title"></p>
````````````````````````````````