Commit Graph
241 Commits
Author SHA1 Message Date
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
david parsons aa2f34f0bc check for non-null T(link) in the safelink function; rename paranoia.t to safelink.t, add a couple more tests for safelinks 2017-11-23 04:44:24 +00:00
david parsons 59044a5001 tweak the safelink detection code to allow more types of url fragments 2017-11-22 20:23:34 -08:00
david parsons f76c08670b Tweak superscript handling to be able to superscript something wrapped in html 2017-01-28 11:45:20 -08:00
david parsons 7049c95664 Don't assume MKD_EOLN is ^C; I may change it to \r so it can be swept up in
isspace() instead of having to do isspace(c) || c == MKD_EOLN
special checks for
2016-09-22 21:11:14 -07:00
david parsons 0d71ce7785 Kludge peek() and poke() to not sign extend on machines with signed chars,
so a 0xff character will not sign extend and become an EOF.  This breaks
a test in mun\CC\83oz.t (which tripped the 0xff becomes EOF bug) so that
test needed to be rewritten.

Inline comment handling is still broken!  It only checks for a > to end
a html comment, not the correct --> sequence!
2016-07-16 15:06:40 -07:00
david parsons f3681ccc8d Eat one of the two remaining flag bits (64-bin flag_t, here we
come!) to make LaTeX support a runtime flag.
2016-05-21 21:58:50 -07:00
david parsons b46eb12f13 Tweak the initial check for $$ .. $$ latex escapes 2016-02-21 09:09:46 -08:00
david parsons a263259aae Expand embedded latex to support $$ .. $$, \[ .. \], and \( .. \) escapes 2016-02-20 22:10:46 -08:00
david parsons 2f887510b3 Wrap the patch with WITH_LATEX (configure.sh --with-latex) 2016-02-19 21:28:38 -08:00
david parsons 849d7e174c Merge git://github.com/leonsim/discount into latex 2016-02-19 21:09:22 -08:00
david parsons c60dab9d24 When processing automatic links, explicitly allow extended utf-8 characters
as part of the url.
2015-10-29 07:38:06 -07:00
david parsons e7e9f43132 in mkd_document() don't pad the generated html with a 0 unless it's actually generated. 2015-10-25 16:47:07 -07:00
Liang Sun d0db9edcf6 Merge branch 'master' of github.com:davidfstr/discount 2015-08-28 19:05:36 +08:00
Nathan Phillip Brink 5da3388382 Convert urlencodedanchor to a runtime flag for issue #124.
Instead of `./configure.sh --with-urlencoded-anchor`, now use
`-furlencodedanchor` or `MKD_URLENCODEDANCHOR`.
2015-07-13 03:24:31 +00:00
Nathan Phillip Brink 5790b66a4a Make githubtags configurable at runtime for issue #124.
Instead of `./configure.sh --with-github-tags`, specify `-fgithubtags`
or `MKD_GITHUBTAGS`. Shows up in `markdown -VV` as `GITHUBTAGS`
instead of `GITHUB-TAGS` now.
2015-07-13 03:24:31 +00:00
Nathan Phillip Brink 2ff7c1f41b Convert compiletime ID Anchor setting to runtime flag for issue #124.
Now specify flag `-fidanchor` or `MKD_IDANCHOR` instead of
`./configure.sh --with-id-anchor`. In `markdown -VV` displays as
`IDANCHOR` or `!IDANCHOR` rather than `ID-ANCHOR`.
2015-07-13 03:24:31 +00:00
Alessandro Ghedini 55fa30278a Fix deterministic email address mangling 2015-04-10 14:49:29 +02: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