Commit Graph
100 Commits
Author SHA1 Message Date
david parsons 8a04e31105 add some tests against null flag parameters 2022-05-13 21:55:54 -07:00
david parsons 39874c6072 use -I$(TOPDIR) & -L$(TOPDIR) when building things in tests/exercisers 2022-05-13 21:44:50 -07:00
david parsons 78e91047cd ugh. Prefixed the wrong thing with TOPDIR 2022-05-13 21:35:29 -07:00
david parsons 8d9707a4fa add spotless recursion; pass TOPDIR to the test/exercisers so I can construct an appropriate @LD_LIBRARY_PATH@ for running the test programs 2022-05-13 21:25:50 -07:00
david parsons 5fa07a501e clean the exercisers directory when cleaning everything else 2022-05-13 21:00:33 -07:00
david parsons d9847e36be add an exerciser to verify flag set, flag clear, and flag copy 2022-05-13 20:14:37 -07:00
david parsons b3f7b306e7 clean up the internals of mkd_copy_flags() 2022-05-13 19:20:23 -07:00
david parsons 76deae28d2 forgot to put a prototype into mkdio.h.in 2022-05-13 18:21:25 -07:00
david parsons b79887284a add a flag copy function 2022-05-13 16:38:45 -07:00
david parsons 2739f6de43 messed up pandoc header flagging; it defaulted to NOHEADER in populate() 2022-04-22 02:18:22 -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 e2358b85c0 document the -toc flag in the markdown program 2022-04-04 00:46:56 -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 304344cf1f I was a little too aggressive when stripping out the recursive uniquification (& redo the test case to reflect starting sequences at zero instead of 1 2022-03-23 16:10:58 -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 b0c4415947 don't use diff -c (Busybox diff doesn't support it) but just dump the diff output to /dev/null 2022-03-22 17:30:37 -07:00
david parsons 599617843e implement a toc label uniquifier 2022-03-22 17:01:14 -07:00
david parsons 5b0d7fd8e8 oops, forgot to add space2nl to sccs 2022-03-22 09:10:52 -07:00
david parsons 1473d6b678 Merge branch 'main' of github.com:Orc/discount into main 2022-03-21 14:00:29 -07:00
david parsons 38b2ce4b5c work around a bug with some implementations of tr that don't map \n to a newline 2022-03-21 13:56:44 -07:00
david parsons 26d6ea4634 clean up acLookfor so it doesn't do a break 3 where a return would do 2021-11-08 11:12:29 -08: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
david parsons f02cee798f accidentally mixed code and declarations in theme.c, which makes old versions of gcc puke 2020-11-27 08:09:06 -08:00
david parsons 0ba5f4198f ugh, forgot to in AC_CHECK_ATTRIBUTE 2020-11-27 07:54:19 -08:00
david parsons f2d1c079cc I need to use AC_UPPERCASE in AC_CHECK_ATTRIBUTE 2020-11-27 07:48:58 -08:00
david parsons fec9d47332 strip out some inadvertant bsdisms/gnuisms from configure.inc 2020-11-27 07:37:39 -08:00
david parsons c766bc5569 changed the main branch name to 'main', so the what's my branch name? tool needs to know about that 2020-06-14 12:33:20 -07:00
david parsons 90f4342678 split pgm_options into itself + flagprocs so that the new flag set/clear functions can be placed into the library w/o bringing in the rest of pgm_options 2020-05-27 14:30:31 -07:00
david parsons bbfb1a7f87 strip out the unused prototypes for mkd_flag_set & mkd_flag_clear (discount3 uses mkd_set_flag_num & mkd_clr_flag_num) 2020-05-26 20:23:48 -07:00
david parsons c444b233db add v2compat to the libmarkdown library in the cmakefile 2020-05-26 17:15:16 -07:00
david parsons c4b97d6cf7 use mkd_free_flags() in all the demo programs 2020-04-08 12:26:13 -07:00
david parsons e3042eb904 add a free_flags() function to complement the flag blob maker 2020-04-08 11:46:26 -07:00
david parsons e42188e6c4 didn't include $(MKDLIB) as a requirement for pandoc headers, leading to hilarity when I did a make -j 2020-04-08 01:24: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 53965d67c8 add a testcase for empty ## 2020-03-28 23:21:58 -07:00
david parsons 1003923bca fix a malloc overflow when doing mkd_anchor_format() 2020-03-28 23:14:23 -07:00
david parsons 2e900346a0 make the published mkd_flag_t opaque and add a new function (mkd_flags()) to generate a flag structure and return it in malloced memory 2020-03-07 19:56:22 -08:00
david parsons 12e8c9c715 messed up the number of bits in a byte? 2020-01-26 12:45:48 -08:00
david parsons 5a59d221aa document mkd_e_code() 2020-01-24 09:16:58 -08:00
david parsons 61b336fd28 have v2compat convert from the 2.2.6 flags, not the flags that live in the limbo between 2.2.6 and v3 2019-12-18 10:17:41 -08:00
david parsons dfb7e00281 start gluing up a v2 compatability layer 2019-12-15 21:08:36 -08:00
david parsons 74a3544bf5 fix up theme default settings in configure.sh 2019-12-10 22:40:50 -08:00
david parsons 43c5c0496b fix up theme default settings 2019-12-10 22:37:51 -08:00
david parsons e677e83165 update the header verification program so it works with the new flag format; cosmetically tweak mkdio.h.in & markdown.h to make it easier to automatically diff the two enums 2019-12-10 09:24:46 -08: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 9d1b68af38 do more checking for null pointer flags in the published interface 2019-12-08 08:47:09 -08:00
david parsons eb3cea8983 more cleanup of null pointer dereference crashes during pandoc header processing 2019-10-29 18:41:45 -07: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 d74c180a8c Merge github.com:Orc/discount into v3 2019-07-30 13:56:32 -07:00
david parsons aeadbe2549 Pull in patches for msvc & plan9 builds 2019-06-15 16:30:27 -07:00
david parsons 4b67316d6e mkd2html wasn't properly handling two arguments for input & output files. While I was at it, add the -G option to use gfm_in() to read the input file in (and preserve newlines) 2019-04-15 08:28:20 -07:00
david parsons 5a4f0170ca mkd2html wasn't properly handling two arguments for input & output files. While I was at it, add the -G option to use gfm_in() to read the input file in (and preserve newlines) 2019-04-15 08:24:53 -07:00
david parsons 1bec1a0ef2 since github checkboxes are configured to be input objects by default, don't have a bare --github-checkbox non-intuitively set them to html entities 2019-04-15 07:15:35 -07: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 2be654fdeb mkd2html wasn't passing pgm to hoptusage() 2019-04-12 11:47:08 -07:00
david parsons 5bf1c6cfae add an external code block formatter to the markdown program 2019-04-12 08:25:02 -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 ee2b955fd6 tweak configure to (a) use the modern standard uintXX_t types for DWORD, WORD, BYTE if possible and (b) if a program is defined via an environment variable (like CC) try to use that variable instead of doing a path search in AC_PROG 2019-02-27 11:56:21 -08:00
david parsons 647e65069e when dumping the parse tree, say which header is being dumped -- h1..h6 vs just header 2019-02-23 00:35:16 -08:00
david parsons 3d63e86076 add some dle sanity checking into onlyifset() 2019-02-22 13:27:02 -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 805cc0eae1 don't publish mkd_string_to_anchor 2019-02-15 16:31:57 -08:00
david parsons e46dc76b25 prep 2.2.6 2019-02-12 07:47:28 -08:00
david parsons 18b65b162c add two more tests (unfinished fenced code block, paragraph then fenced code block) to codeblock.t 2019-02-10 10:05:34 -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 8cc83f10c2 add a test case for a piece of fenced code with trailing spaces after the opening ~~~ 2019-01-31 05:47:19 -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 e02f8005ee add a fenced code block with embedded html 2019-01-29 21:39:17 -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 073c7af868 patch the cmakefile so that has an option to only generate a library 2018-10-07 10:07:41 -07:00
david parsons f46d425c2f add a list item for testing the build 2018-10-06 15:13:02 -07:00
david parsons 1222dece76 tweak the Makefile macros a bit so people can wedge in their own compilers (BUILD) and linkers (LINK) during a build 2018-09-19 12:09:38 -07:00
david parsons 311b33218f set the Plan9 CFLAGS to the two extensions (instead of having them be part of the CC macro) and wipe out any CFLAGS (like -T, which tells the Plan9 posix C compiler to be stupid) that already exists 2018-09-19 08:14:37 -07:00
david parsons 839ba61428 when checking that the C compiler works, compile the test program as two modules with a function declared with differing pointer types (char ptr vs void ptr) so if the C compiler generates type signatures and doesn't think a void pointer is the universal solvent it will fail right there 2018-09-18 12:36:06 -07:00
david parsons 0308244ec8 shuffle around some of the definitions to make everything happily(?) compile with all instances of flags being mkd_flag_t 2018-09-18 08:32:03 -07: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 cf74d6d218 make all instances of 'main()' be integer functions (sigh) 2018-09-16 14:41:42 -07:00
david parsons a6bcdd1ce5 include config.h before any other headers 2018-09-14 20:20:00 -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 798fdfb14c if a makefile is detected during configuration, do a rm -f markdown echo cols branch pandoc_headers mkd2html makepage theme *.o
rm -f libmarkdown `./librarian.sh files libmarkdown VERSION`
rm -f Makefile version.c mkdio.h config.cmd config.sub config.h config.mak config.md librarian.sh config.log ./mktags ./blocktags with it before doing the new configuration
2018-09-14 13:33:51 -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 11c757d70b move flags.o down to the last line in OBJS= to work around a plan9 makefile bug 2018-09-12 08:57:02 -07:00
david parsons 78db45cc5f gonna be 2.2.5 pretty soon 2018-09-12 08:21:12 -07:00
david parsons 20d03a3de7 messed up the definition for missing attributes; should be /**/ instead of '', because AC_DEFINE will convert an empty string into a 1 2018-09-12 08:14:58 -07:00
david parsons c4c753da12 add in a handful of test to verify that empty pandoc headers are not auto-populated with % 2018-09-07 15:41:40 -07:00
david parsons 06ac2cc08f if __mkd_trim_line trims the entire line, manually set the string to \0 2018-09-07 15:10:29 -07:00
david parsons 0e587c4afb make a test program to examine pandoc header elements 2018-09-06 21:46:36 -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 0d01a2c9c0 to b3 2018-06-16 11:51:57 -07:00
david parsons 16e47523e0 whoops, misspelled Aaron's last name 2018-06-03 21:05:28 -07:00
david parsons 2324a09ac6 Add Aaron Schwartz (RIP) to the original author credit 2018-06-03 21:03:53 -07:00
david parsons 79e230a0ef Merge https://github.com/Crypto-Anarchist/discount (strike HGROUP from
the list of html5 tags)
2018-06-03 20:58:24 -07:00
david parsons 60539e2af3 add a testcase for indented last line in html block with trailing text 2018-05-26 18:59:18 -07:00