Commit Graph
19 Commits
Author SHA1 Message Date
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 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 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 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 e199a7aa9e if an unknown flag was in the middle of a comma-delimited flag
string (like -flatex,bogus,footnote), the markdown program
would incorrectly report the first flag as unknown (because set_flag
returned 0 on error, 1 on success and the strtok() of the flag string
had already replaced the commas up to that point with nulls.)

Change it so that set_flag returns null on successful processing and a
pointer to the offending flag on an unknown one.
2017-09-25 12:42:47 -07: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
Mateusz Łoskot ed579626b6 Remove redundant <unistd.h> header as unused 2017-02-02 23:28:38 +01:00
david parsons 9b792090ce Tweak the show_flags() function so that if it's called verbosely
it will show synonyms for named flags.   (Calling it verbosely is
done by the `V` option, which is overloaded for verbosity when listing
flags.)
2017-01-26 23:40:04 -08:00
david parsons 87835ec236 Add html5anchor as a synonym for urlencodedanchor (urlencoded is
depreciated, but will stick around like the unwanted guest until
the next major release) now that I'm doing html5 encoding there.
2017-01-18 18:38:42 -08: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
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
Nathan Phillip Brink 088b5ab628 Convert --with-fenced-code to runtime flag for issue #124.
This change is more invasive and difficult for me as not all existing
preprocessor directives directly translate to `if () {}`.

Instead of passing `--with-fenced-code` to `configure.sh`, now use
`MKD_FENCEDCODE` or `-ffencedcode`.

The output of `markdown -VV` will now display `FENCEDCODE` if the
feature is enabled and `!FENCEDCODE` if it is disabled rather than
displaying `FENCED-CODE` if the feature is enabled.
2015-07-13 03:24:30 +00:00
Nathan Phillip Brink 811a8560dd Convert --with-dl to runtime flags for issue #124.
Instead of specifying `./configure.sh --with-dl=both`, specify
`-fdlextra` or `MKD_DLEXTRA` at runtime.
2015-07-13 03:24:29 +00:00
david parsons f34f9a1f51 Add the new option MKD_NOSTYLE, which disables special handling
of style blocks and treats them like plain old html.
2012-08-05 20:30:45 -07:00
david parsons dc674a3da0 add a dummy cast to the two sort_by_... functions to make clang and gcc
shut the fuck up about pointer type mismatches.
2012-01-19 02:39:38 -08:00
david parsons 80c04f45e8 Change makepage so that I can feed it options
with `-Fxx`, `-fname`, or the environment variable
`MARKDOWN_FLAGS`; this means I needed to split the
options parsing code out of main.c into its own file
that can be included wherever.
2011-05-23 10:59:11 -07:00