100 Commits
Author SHA1 Message Date
jessica parsons abd97acee0 merge recursion-limit into main, up to verson 3.0.2.0 2026-08-28 20:34:06 -07:00
jessica parsons 52db5cfdc9 add an explicit 'int' to the main declaration in 300.c; also add an exit(0) for whiny C compilers; lowercase the title in limits.t 2026-06-19 12:51:51 -07:00
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 e7da52abbf bump up the minor version# to 3.0.1.3 2026-06-09 12:44:21 -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 ff09a191cd add a prototype for memset() because gcc/clang/whatever on macos ventura gets a sad when it doesn't see one 2025-09-11 12:58:45 -07:00
jessica parsons c214286f91 3.0.1.2 -- fix a host of string allocation bugs 2025-09-08 09:51:18 -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 985091d673 use calloc instead of malloc when initializing footnotes & flags 2025-09-08 09:31:16 -07:00
jessica parsons 41f71fe10f make it version 3.0.1.1 after some bugfixes 2025-09-07 14:27:45 -07:00
jessica parsons 0ad136bdfb don't look for the destructor attribute now that I've moved the html5 tags data into the mmiot 2025-09-07 14:27:11 -07:00
jessica parsons 74551d84d8 ugh; forgot to null terminate foot->width & foot->height 2025-09-07 14:26:08 -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 ed83925ecf up to version 3.0.1 (for publication) 2025-09-03 18:20:49 -07:00
jessica parsons 7ea393a2c2 ugh; modified mkdio.h instead of mkdio.h.in 2025-09-03 17:54:26 -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 0bd7bfa773 move pgm_options.c into the discount library so I can publish mkd_set_flag_string() 2025-09-03 15:10:50 -07:00
jessica parsons 71bd0a7246 fix the manpage for mkd_line/mkd_generateline 2025-09-03 00:51:41 -07:00
jessica parsons f61b163f36 FINALLY start updating the documentation to the v3 published interface 2025-09-02 22:47:41 -07:00
jessica parsons 4b37a17f86 Merge netbsd11:Src/discount into main 2025-08-31 21:21:31 -07:00
Jessica L. Parsons 7b96468c13 add a check for broken isspace() (in netbsd11) 2025-08-31 21:19:59 -07:00
jessica parsons b49c306b6c update the cmake scaffolding (patch by christophe-calmejane on github) 2025-08-31 21:19:52 -07:00
jessica parsons 05d75492b9 update the cmake scaffolding (patch by christophe-calmejane on github) 2025-08-30 01:49:05 -07:00
jessica parsons 286f43f7d4 forgot to add a test case for linkylink extended attributes 2025-08-30 01:23:47 -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 ae3f28f5de fix the tests for expected output from markdown -b<prefix> 2024-10-07 01:33:09 -07:00
jessica parsons 5443e322c3 tweak the test for zero in __mkd_io_strget so if it's <=0 it's EOF 2024-10-07 01:28:53 -07:00
david parsons 01aacfdf02 add 3 testcases for mkd_basename (-b flag in the markdown program) 2024-10-07 01:25:16 -07:00
david parsons c494e40d0a mkd_basename() was broken; the callback it uses did not check to see if the offending url started with a slash; also CHANGE MY NAME on the copyright notice for configure.inc 2024-10-07 01:14:28 -07:00
jessica parsons bf05eb5fb8 for some reason mkd_h1_title() was expecting a separate flags argument, but none of the prototypes defined it that way but still it compiled. Okay, that wasn't right 2024-10-03 20:02:33 -07:00
david parsons 827bedd96c further tweak the formatting for theme -V+ output 2024-09-08 15:53:52 -07:00
david parsons e98b949928 tweak the formatting for theme -V+ output 2024-09-08 15:52:31 -07:00
jessica parsons cc42e7ed69 I was calling show_flags() [tabular output] for theme -VV instead of mkd_flags_are() [streaming] 2024-09-08 15:16:03 -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 9bbb93b6f4 up to version 3.0.0e 2024-09-05 15:14:11 -07:00
jessica parsons c454b323c9 add a test case for LaTeX single $ quotes 2024-09-05 15:13:17 -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 ff866f73d4 up to v3.0.0d 2024-02-06 22:01:05 -08:00
david parsons 5396375eca it's not an email address if it starts with a '@' 2024-02-06 21:26:16 -08:00
Orc 03f5ed7478 I put the --container check (in the librarian maker) in the wrong place! 2024-02-06 20:57:15 -08:00
david parsons 737e7ee6fe add the --container config option so a ldconfig won't be installed into librarian.sh 2024-02-06 20:50:51 -08:00
david parsons 2eea56e23f add a test case for >%class1 class2% 2024-02-06 15:17:19 -08:00
david parsons 37b034fe98 allow multiple classes for >% blocks 2024-02-06 14:57:11 -08:00
david parsons 033f07110d replace an include of strings.h w string.h 2023-12-22 09:36:54 -08:00
david parsons 9939a3fa20 make tools/rep.c fancier by expanding backslash escapes; add a crash test for a #header line with a bucketload of trailing spaces 2023-12-14 17:25:52 -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 6cad28c817 left an argument out of main.c's memory deallocator callback 2023-12-13 21:54:17 -08:00
david parsons 976ad8682a up to version 3.0.0c 2023-12-13 21:42:13 -08:00
david parsons 90aeed07e3 update the callback creation functions to use the proper arguments 2023-12-13 21:40:29 -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 2e2ddad4db set the version to 3.0.0b 2023-12-11 19:50:46 -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 parsons 5d13c2828d add config.sed to the list of config files (to avoid HILARIOUS errors if I simply rsync a discount to a different machine 2023-01-26 18:17:11 -08:00
david parsons 34d18df915 up to v 3.0.0a 2022-10-27 11:35:18 -07:00
david parsons 262c7c7dba fix code indentation in a test program in configure; tweak title
generation in xmlpage to stop gcc & clang from complaining about
dangling elses
2022-10-27 11:19:39 -07:00
david parsons e451aac683 add a new testcase to verify that -> ... <- works properly 2022-10-22 20:33:57 -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 37b22a997e match the descriptions for MKD_STRICT in mkdio.h.in & markdown.h 2022-10-04 12:27:16 -07:00
david parsons 583969803f hunt down and remove all references to the NORELAXED flag (now STRICT) 2022-10-04 12:22:55 -07:00
david parsons 2206091f80 add a fistful of test cases for the new! improved! Markdown.pl compatible <tags> 2022-10-04 12:12:54 -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 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 10c99d3a64 left out <sys/wait.h> 2022-08-02 09:45:17 -07:00
david parsons 97784f4ca5 don't use WNOHANG in waitpid; check child status to see if the formatter exited normally or abended & return the original code fragment if the latter 2022-08-02 09:34:31 -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 26ba488a8a make the new function hoptdescribe(), which is exactly like hoptusage() except it has an additional verbose flag that tells it to do a more described list of the options 2022-07-31 23:34:13 -07:00
david parsons f8512ad0f0 streamline the exerciser make.include; use the toplevel .c.o rule to make objects, DON'T use $< when making executables because bsd make populates it with MKDLIB, which doesn't actually work 2022-07-30 23:29:36 -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 89f1dfdef7 more tweaking; when I include $(MKDLIB) as a dependency for an exerciser test, $< disappears when compiling on netbsd8? 2022-07-20 17:13:14 -07:00
david parsons 380229266f don't forget to set up LD_LIBRARY_PATH when running the exerciser tests 2022-07-30 07:50:08 -07:00
david parsons 6e03172bea tweak the makefiles to ensure that libmarkdown (a synthetic target) is make before any of the executables are assembled during a parallel make 2022-07-30 14:39:42 +00:00
david parsons 25f24b5bf4 rework how flags are initialized & configured for <?theme commands 2022-07-29 23:59:48 -07:00
david parsons 436a0c033e change from submakes to included makefiles 2022-06-22 13:43:51 -07:00
david parsons 4cdcac0d90 by request change the document type from html 4.0 to whatever the current version of html is (currently 5) 2022-06-19 17:47:30 -07:00
david parsons 63f542f34d silence the commands to make the exerciser programs 2022-06-18 09:08:48 -07:00
david parsons b81982c8a7 didn't catch one of the -C's in the exerciser makes? 2022-06-18 08:56:18 -07:00
david parsons 487c07f4cf working around the embedded gnuism is harder that I thought 2022-06-18 02:29:03 -07:00
david parsons 85684a0b79 bitten by a GNUism; I was using make -C to build the exercisers, which isn't portable 2022-06-18 02:23:20 -07:00
david parsons 4fecf0bd46 xmlpage had a variable declaration in the middle of a block 2022-06-18 02:11:23 -07:00
david parsons f4b7dd8b64 move the -lmarkdown to the END of the commandline where I link the flags exerciser program, because otherwise it doesn't get properly included in the link on one of my mips linux boxes? 2022-06-18 02:00:54 -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 1c3c0e9d39 Merge branch 'main' of github.com:Orc/discount into main 2022-06-18 00:27:36 -07:00
david parsons a0d2a96024 when checking character classes move the utf-8 check in front of all of the other checks; some versions of MSC have a debug mode so if a character isn't either 7-bit ascii or EOF the character class check functions will abort the program. Like, um, yeah, way to creep those standards, people! 2022-05-30 13:32:29 -07:00
david parsons 30ac4a5b1c shut up the 'nothing to be done' message in this submake. 2022-05-13 23:48:51 -07:00
david parsons 57ef3dd3d2 tweak the exerciser makefile a bit; have the toplevel makefile build the exerciser programs as part of make all 2022-05-13 22:33:56 -07:00
david parsons 5ae6841337 voidify the say() function in tests/exercisers/flags.c 2022-05-13 22:27:29 -07:00
david parsons fa3def69c7 in the flags exerciser, put all output to stdout, /not/ stderr 2022-05-13 22:19:51 -07:00
david parsons e42b39d8ed pass @LD_LIBRARY_PATH@ to function checkers in tests/exercisers 2022-05-13 22:11:59 -07:00
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