Commit Graph
231 Commits
Author SHA1 Message Date
jessica parsons 2ae87732d9 add code to do maximum recursion depth, and default it to 200 2026-06-16 01:54:15 -07:00
jessica parsons a55e87e63d add a 'section_break' flag into the line structure to keep the contents of adjacent blockquote chunks as separate blocks inside the blockquote 2026-06-09 12:07:54 -07:00
jessica parsons 39be61ef2c go back and tweak the effing fenced code disaster area so that it will break fenced code out into its own div and consume html & footnotes at the top level. 2026-05-31 14:12:03 -07:00
jessica parsons 63c7eb3d86 change amalloc so it fills malloc()ed memory with a nun-null pattern, which found a WHOLE BUNCH of places where I was not null-terminating strings but instead was taking advantage of amalloc always zeroing new allocations. 2025-09-08 09:50:17 -07:00
jessica parsons 74551d84d8 ugh; forgot to null terminate foot->width & foot->height 2025-09-07 14:26:08 -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 37b034fe98 allow multiple classes for >% blocks 2024-02-06 14:57:11 -08:00
david parsons 95ca643137 fix a bug in tab expansion where I was lazy, assumed that T() strings would always be null-terminated, but didn't null terminate the resulting string after a tab expansion 2023-12-14 02:21:47 -08:00
david parsons 6fbfeb9116 fix a handful of places where I either didn't guard against underflows or null pointers; add test cases for them in crash.t 2023-12-11 19:42:37 -08:00
david parsons 4a73e7f7d6 have all of the extensions code guarded by checking against MKD_STRICT 2022-10-05 12:22:28 -07:00
david parsons 066d0ed47c I had a variable defined in the middle of a block, which is a C nocando. 2022-06-18 01:22:16 -07:00
david parsons 74f6bd9b49 checkline was still having problems with properly detecting fenced code blocks 2022-04-11 14:25:12 -07:00
david parsons 0137688a6b clean up fenced code marker detection 2022-04-11 09:53:53 -07:00
david parsons 543628f9f4 the toplevel compilation pass needs to back out of an unclosed bit of fenced code 2022-04-08 23:54:20 -07:00
david parsons 6c1d704075 tweak the fenced code disaster 2022-04-08 23:18:24 -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 0571211c84 I wasn't properly uniqifying the top level of compiled fragments for toc labels 2022-03-28 10:18:11 -07:00
david parsons 343845b66d rework the whole TOC uniquifier so it only runs at the end of a compilation; put code in (#ifdeffed out) to recursively uniquify names if I ever decide to throw a wider net when generating a TOC 2022-03-23 16:08:07 -07:00
david parsons 599617843e implement a toc label uniquifier 2022-03-22 17:01:14 -07:00
david parsons 29fd434453 restructure the dd accumulator in definition_block() so that the goto isn't *quite* so horribly an abuse of block structure 2020-04-08 01:21:56 -07:00
david parsons c5ea5bbadf redo the mkd_flag_t set functions to more closely fit how I'm using them and to have more descriptive names 2019-12-08 09:39:23 -08:00
david parsons fd801c6951 don't COPY_FLAGS null flags; just initialize to 0s 2019-12-08 08:16:22 -08:00
david parsons b9e867b574 redo the whole flags dealie as an opaque blob 2019-12-07 22:49:52 -08:00
david parsons b52ec440d4 strip out MKD_STRICT as a single flag (convert it into a composite flag that turns off a whole bunch of extensions); use that flagbit to disable github checkbox items, strip out MKD_DLIST as a single flag (convert it into a mask of MKD_DLDISCOUNT|MKD_DLEXTRA, and rework pgm_options so that 'strict' and 'relaxed' apply only to emphasis and 'standard' is the flag that sets & clears flags to make it closer to the standard. Version 3 because I'm fucking with the published interface 2019-04-14 20:56:55 -07:00
david parsons 0d33c8fe0d tweak how scalar headers are include in .in files 2019-02-27 12:10:35 -08:00
david parsons 50c628197f yank the repeated inline uncaches out and stuff them into a local function 2019-02-10 09:51:56 -08:00
david parsons 5577a536b4 deal with cached text before handling fenced code blocks 2019-02-10 09:47:10 -08:00
david parsons 4fba9d82a9 push the fencedcode block handler up to the toplevel scanner so it will handle blank lines inside the fence 2019-01-29 17:46:10 -08:00
david parsons 7fdc188f07 clean up all references to flags; define them EVERYWHERE as mkd_flag_t 2018-09-18 08:25:27 -07:00
david parsons b002a5a4db when splitting a line, null terminate the new line; also don't inherit the dle from the previous line 2018-05-26 13:57:35 -07:00
david parsons faad80e95a check for [x] & [X] 2018-04-17 21:07:39 -07:00
david parsons a12d7d7294 take a pass at github checklist items 2018-04-17 18:09:33 -07:00
david parsons 5701d743c5 strip out a nextblank loop in favor of a call to nextblank 2018-03-14 21:04:56 -07:00
david parsons b73576c20e generalize __mkd_header_dle() into __mkd_trim_line() [trim N characters off the front of a line, adjust the dle] then use it instead of the pair CLIP/firstnonblank to trim & adjust dle 2018-03-10 10:33:57 -08: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 6e95a936d7 move the code to gather up the lines in a m-e footnote into its own subroutine 2018-03-09 18:55:16 -08:00
david parsons fd48cc7885 tweak m-e footnotes to do blocks of text 2018-03-08 12:11:39 -08:00
david parsons 6e52af8dd8 Add in paranoid list splitting (the default behavior many many versions
ago before I realized it wasn't the standard) (and take the last of the
32-bit flag mask for it) between adjacent ordered and unordered lists.
2017-03-08 02:32:37 -08:00
david parsons b39005d43d Add a 'dirty' flag to the Document structure & set it whenever a callback
changes (github issue #136) so that the next mkd_compile will regenerate
the document.
2017-01-28 15:48:00 -08:00
david parsons 9d6a4a9636 Process html block in compile (as well as in compile_document();
compile_document() needs to handle <style> blocks and compile() needs to
handle html blocks that are nested inside blockquotes, tables, lists, &tc.
2017-01-26 15:42:33 -08:00
david parsons b40018e9e9 Clean up the indentation in fencedcodeblock() 2017-01-26 15:33:14 -08:00
david parsons d4b85ccf0c More brute-force casting to discourage sign extension 2016-09-21 13:24:51 -07:00
david parsons 1c594226a0 Continuing with the horrible comment block kludgery :-( 2016-02-13 11:45:56 -08:00
david parsons d658ae6990 Semi-revert the commentblock changes, then horribly kludge in a patch
that reenables them  (memory corruption on freebsd 7.2 at program end
w new code;  check control flow!)
2016-02-13 11:31:53 -08:00
david parsons 058820ed9d Redo comment block handling; standard markdown only treats comments as
block html if the start comment marker starts at the beginning of a line
and the end comment marker is at the end of a line.
2016-02-13 09:39:26 -08:00
david parsons ccffec0319 When attempting to match the closing tag of an html block, don't
advance the match index unless that character actually matches.
(defect:  `<p></>*` was splitting into 2 lines when it should have
generated `<p><p></>*</p>`)
2016-02-02 20:31:40 -08:00
david parsons 7f169f4abf EXPERIMENT: if mkd_compile() is called multiple times, actually recompile the document if the flags change. 2015-11-01 22:00:58 -08:00