20 Commits
Author SHA1 Message Date
jessica parsons 985091d673 use calloc instead of malloc when initializing footnotes & flags 2025-09-08 09:31:16 -07:00
jessica parsons 8ddfb981ef redo the html5 flag option to make it a per-MMIOT thing, instead of being a global block that we have to deallocate when we're done; also take the opportunity to clean up mkd_initmmiot to have it set fags & html5 extraflags instead of duplicating that code in three places 2025-09-03 17:26:21 -07:00
jessica parsons 61c748f021 add support for extended attributes on [] & ![] links 2025-08-30 01:09:53 -07:00
jessica parsons 6ff6878cfd add support for % widths & heights for images (original implementation by mwfong-csl (on github); my implementation only because I couldn't figure out how to pull github patch requests into my master repository on pell) 2025-08-29 17:01:07 -07:00
jessica parsons 5e2f73aec4 update my name to the current one 2024-03-29 23:41:29 -07:00
david parsons 1321a22ecd first pass at collapsing fenced code blocks into regular paragraphs 2022-04-07 22:36:36 -07:00
david parsons 599617843e implement a toc label uniquifier 2022-03-22 17:01:14 -07:00
david parsons 6ac7f5ccf3 implement the m-e behavior of allowing full markdown inside m-e footnotes 2018-03-09 21:15:49 -08:00
david parsons fd48cc7885 tweak m-e footnotes to do blocks of text 2018-03-08 12:11:39 -08:00
david parsons 46e147599f FINALLY address the bug where m-e footnotes lose numbering when
they show up in nested element; I was not carrying the m-e reference#
inside the footnotes structure, but was instead carrying it in the
parent structure and not updating it.  So I changed the footnotes structure
to include the reference + the list of footnotes, which made the misnumbering
go away on my tests.
2015-01-18 12:12:28 -08:00
Loren Segal 87d6e711cd Support language attr on fenced code block line
The following syntax should now be valid:

    ```lang
    CODE HERE
    ```

And generates:

    <pre><code class="lang">CODE HERE
    </code></pre>

This syntax allows support for GitHub Flavored Markdown style
fenced code blocks used on [GitHub][1].

[1]: https://help.github.com/articles/github-flavored-markdown
2013-06-29 17:03:44 -07:00
david parsons 4b10998ed1 Redo the internals for pandoc-style headers; don't just carry
around a linked list, but pull each field out into its own structure
element.
2010-12-09 14:05:29 -08:00
David Parsons 945258644c Add a VALID_DOCUMENT magic flag to the Document structure.
Set it when a Document is allocated, clear it when it is
deallocated.
2010-05-27 21:40:29 -07:00
David Parsons c99e478aad Rework all of linkylinky() to make it a little bit less of a huge
monster bodge.   It's no shorter, but it's a little bit clearer, I
hope, and now I can revisit it and rework the whole link name gathering
scheme if need be.
2009-06-08 10:39:57 -07:00
David Parsons 70594763c4 Replace the internal function __mkd_xml() with new published
functions `mkd_generatexml()` [write the xml'ed version of a
string to a file] and `mkd_xml()` [write the xml'ed version of
a string into `malloc()`ed memory]
Also move `mkd_text()` into mkdio.c, and put the new xml functions
into their own module.
2009-05-12 10:15:28 -07:00
David Parsons 95750433b5 __mkd_xml() was stripping all non-printable ascii from the output, which
meant that it was also stripping all multibyte utf-8 from the output.
Since all the parts of a multibyte utf-8 character have bit 0x80 set,
pass those characters through.
2009-04-30 08:47:34 -07:00
David Parsons 032d49984f Add support for blockquote-as-div; if the first line in a blockquote
is `>%ident%`, `>%id:ident%`, or `>%class:ident%`, treat the block as
a `<div>` with id="_ident_" or class="_ident_" (if `id:` or `class:`
is not specified, default to `class`.

The new option --enable-div turns this feature on.

Also add the new option --enable-all, which turns on all optional
features EXCEPT for tabstop=N (because a number has to be specified
for that.)
2008-09-11 09:31:43 -07:00
david parsons e37a9b1015 Forgot to let mkd_text() write data in xml format. 2008-04-14 23:52:23 -07:00
david parsons d9b09d2046 Beat up on the code to make the MMIOT in reparse() inherit the parent
bookmarks.
2008-04-14 01:49:34 -07:00
david parsons db71020b14 Forgot to add this file. 2008-04-10 16:51:25 -07:00