Consecutive footnotes do not need to be surrounded by blank lines,
courtesy of @microjo. For example, this is now possible:
[^1]: footnote1
[^2]: footnote2
Previously, when an emphasis was put inside parenthesis, the option
no_intra_emphasis return it as is. This commit fixes this issue. It
is a redundant issue in tutorials or in readme files.
Make sure that parenthesis inside the link's url are correctly parsed
Redcarpet considered the first ")" occurrence as the link's end so we
first count the number of open "(" and decrement this number each
time we found a ")".
When putting code span into simple or double emphasis, we've got an
unexpected output. This commit fix this problem simply removing an
ignore statement about back ticks in the find_emph_char function
Markdown converts text with four spaces at the front of each line to
code blocks. Of course we should support that, but when using fenced
code blocks, indented one can even be harmful. There should be a way to
turn them off.
This patch adds option to disable indented code blocks.
This just adds support for using a plus (+) as an intersection character
instead of requiring pipes (|). The emacs org-mode table syntax
automatically manages ascii tables, but uses pluses for line
intersections.
- Code blocks nested inside of lists won't be checked
for line starts
- The minimal indentation to continue a multi-paragraph list
has been reduced to 1 space, instead of 4. This is not what the standard
says, but what the Markdown.PL does.
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
Add escaping to ~ and ^, and disable autolinking inside of link bodies.
Note that the fix for autolinking is different than the one in Snudown;
I didn't want to touch the callbacks table.
"An unordered list followed by an ordered list (separated by double
linebreake) yields only an unordered list with a set of paragraphs
inside it."
Original patch by Igor Bochkariov, backported from Redcarpet.
Previously, block tags like <div>foo</div> were being properly detected,
but tags with attributes such as <div class="blank">foo</div> were
inproperly discarded.
I don't understand what was that check doing there, but it makes no
sense. Emphasis parsing is non-greedy, so it should always close on the
nearest match.
This was the next logical step on the interface revamp for 2.0.
The old API was doing very fishy stuff with allocation: the `rndr`
struct was being called once for every `sd_markdown` call, and the
amount stack space filled with it was just inappropriate (256 bytes
just from the char table and 300 more from pointers in the callback
table).
By creating the renderer on the heap and reusing it, we save a lot of
time on initialization code, at the expense of not being able to
change the enabled extensions on each parse (something which is not
that common anyway).
This will make wrapping Sundown in higher level languages more direct,
given that every other language has OO design, which maps better to
the concept of a reusable renderer.
The old array was not quite optimal, and was not used optimally either.
- The `struct array` that was used for accessing link references has
been replaced with a minimal, fixed-width hash table. This should
be much more straightforward for small documents.
- The `struct parray` used as a string pool has been replaced with
a fast-growing stack. Realloc'ing once per push has never been a
good idea anyway.
Yey for losing boilerplate!
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)