If the first header of a document is a level three header the first list
is nested two times. To prevent this an offset if set when the first
header is found and after that the level is changed to (level - offset).
Correct the following link errors:
markdown.obj : error LNK2019: unresolved external symbol _strncasecmp referenced in function _find_block_tag
autolink.obj : error LNK2001: unresolved external symbol _strncasecmp
html_smartypants.obj : error LNK2019: unresolved external symbol _snprintf referenced in function _smartypants_quotes
I needed to add 1 define in 3 files, betweend #if defined(_WIN32) guards :
- #define strncasecmp _strnicmp
- #define snprintf _snprintf
URL escaping fully escapes all URL components to allow embedding an URL
inside of another. URI escaping is what we need to build the links for
<a> tags!
This was not a good fix. There is plenty of HTML that would have been
parsed unproperly, e.g.
This is a simple example of <em>HTML</em>
that would have not been broken in two lines.
The proper fix is to always print line breaks instead of newlines, and
ensure that Sundown never inserts newlines when rendering span-level
elements, which is the case since the previous commit.
The original SmartyPants comes with three dash replacement modes:
1 => "--" for em-dashes; no en-dash support
2 => "---" for em-dashes; "--" for en-dashes
3 => "--" for em-dashes; "---" for en-dashes
Sundown now runs with number 2, because I am opinionated and I think
that the other 2 options are stupid.
It is by the goodness of God that in our country we have those
three unspeakably precious things:
freedom of speech,
freedom of conscience,
and the prudence never to practice either of them.
-- Mark Twain, Following the Equator (1897)