259 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 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 eda57f596d forgot to null-terminate the extended attribute string in linky_extended_attributes 2025-09-06 11:55:29 -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 4f2cd0c572 have theme check for THEME_OPTIONS to help set initial flags; when handling LaTeX, push back the second character if a $$ .. $$ match fails 2024-09-08 15:00:47 -07:00
jessica parsons 0fe8822395 don't allow zero-length tick sectons; don't pull a second character if mathhandler return false 2024-09-06 18:01:04 -07:00
jessica parsons 44a834c74d in LaTeXspan (as in all the other tickhandlers) cursor(f) points one character into the enclosed span, so I need to cursor(f)-1 to point at the first character in the span 2024-09-05 14:53:41 -07:00
jessica parsons 0bef02c963 support LaTeX preprocessor single $ ... $ escapes 2024-09-04 00:14:31 -07:00
jessica parsons 5e2f73aec4 update my name to the current one 2024-03-29 23:41:29 -07:00
david parsons 5396375eca it's not an email address if it starts with a '@' 2024-02-06 21:26:16 -08:00
david parsons deca3b64b0 okay, the whole callback structure was a hot mess; change it so that every different callback has its own date & free function 2023-12-13 21:31:04 -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 a096c1a3aa fix some brokenness in markdown extra footnotes that made adjacent footnotes not render properly 2023-08-13 19:54:21 -07:00
david parsons faa5150346 add the new runtime flag ALT_AS_TITLE; if an image has no title, use the alt text as the title 2023-02-21 11:03:12 -08:00
David Seifert 7afa5c6242 Make C99 clean
* Clang 16 (and likely GCC 14) will enforce strict C99 semantics
  and break old K&R C declarations and require correct C89
  function prototypes.

Bug: https://bugs.gentoo.org/870952
Clang: https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-implicit-function-declaration/65213/9
2022-10-27 11:08:49 -07:00
david parsons ef25172009 start tweaking in preprocessor support; start with a rough m4 framework 2022-10-22 20:33:17 -07: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 eff5405d86 rework the tag handler to more closely adhere to Markdown.pl's observed behavior; also treat incomplete tags as actual tags in compatability mode (-fstrict) 2022-10-04 12:12:09 -07:00
david parsons e12437122a rolling in the v2.2.7c fix to tag behavior patch 2022-10-04 12:07:49 -07:00
david parsons 9edb0e5908 weird behavior on freebsd 4.8 w/ gcc 2.95.4; if a #ifdef ... #else ... #endif wraps the end of a if () it pukes up an error about a syntax error in a macro; pull those tests out and conditionally #define a macro instead 2022-10-04 11:51:29 -07:00
david parsons 376656c77c the behavior of tags-starting-with-alpha-/-! was not like that of the reference implementation; fixed (in a very script-kiddy leaky fashion which I can't resolve with a runtime flag thanks to the 32 bit flags field in the 2.x series :-( 2022-10-04 11:49:20 -07:00
david parsons 5b6e5b0e07 change the external code block formatting option into an actual external code block formatter 2022-08-01 13:41:33 -07:00
david parsons 6c015711e0 change fenced code behavior to not have a leading newline before the first line within the fence 2022-07-30 23:20:20 -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 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 618fdc5d5e attempt to fix the defect where footnote links in <>'s are not trimmed 2021-06-07 11:57:39 -07:00
Tevo f30e7efd7e Empty array initializers are a GCC extension 2020-11-08 19:45:15 +00: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 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 866e9aaccb support external code formatters 2019-04-10 11:59:04 -07:00
david parsons 0d33c8fe0d tweak how scalar headers are include in .in files 2019-02-27 12:10:35 -08:00
david parsons 1f90fde27f add an anchor format callback, plus add the -x option to the markdown program to squash toc anchors to (close to) github compatability 2019-02-18 20:54:05 -08:00
david parsons 502ec35ae2 don't give a code block class if it's just an empty string 2019-01-30 21:50:15 -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 f555d4c1c4 fix all places where I pass flags to be DWORDs 2018-09-14 20:18:17 -07:00
david parsons 36615e6b15 have peek() return an int instead of an unsigned int (netbsd 8; ctype functions explode with unsigned int arguments?) 2018-09-14 12:18:45 -07:00
david parsons 1baeb2dbd3 Version 2.2.4; also when doing github checkbox as input form disable each checkbox 2018-08-05 13:39:32 -07:00
david parsons 74914a7981 #ifdef the github checkbox generator; if CHECKBOX_AS_INPUT is defined, use a <input checkbox>, otherwise use ballot box entities 2018-04-19 19:08:33 -07:00
david parsons e5f58dcebc pull the htmlify paragraph loop out of htmlify() and it_htmlify() so that it won't want to drift out of sync 2018-04-19 03:32:47 -07:00
david parsons 2578c37ff3 clean up some of the kludgery 2018-04-19 03:22:51 -07:00
david parsons f533bdb512 be more github-alike; use an '<input>' checkbox instead of html entities 2018-04-18 09:09:02 -07:00
david parsons a12d7d7294 take a pass at github checklist items 2018-04-17 18:09:33 -07:00
david parsons e739de7c92 remove the one_extra_footnote() function now that I've stripped the innards out of it 2018-03-09 22:22:13 -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 fd48cc7885 tweak m-e footnotes to do blocks of text 2018-03-08 12:11:39 -08:00