Log message:
Update to 2.2.6. From the changelog:
- make a test program to examine pandoc header elements
- if __mkd_trim_line trims the entire line, manually set the string to \0
- add in a handful of test to verify that empty pandoc headers are not
auto-populated with %
- messed up the definition for missing attributes; should be /**/
instead of '', because AC_DEFINE will convert an empty string into a 1
- move flags.o down to the last line in OBJS= to work around a plan9
makefile bug
- have peek() return an int instead of an unsigned int (netbsd 8; ctype
functions explode with unsigned int arguments?)
- fix all places where I pass flags to be DWORDs
- include config.h before any other headers
- make all instances of 'main()' be integer functions (sigh)
- clean up all references to flags; define them EVERYWHERE as mkd_flag_t
- shuffle around some of the definitions to make everything happily(?)
compile with all instances of flags being mkd_flag_t
- 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
- 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
- tweak the Makefile macros a bit so people can wedge in their own
compilers (BUILD) and linkers (LINK) during a build
- add a list item for testing the build
- patch the cmakefile so that has an option to only generate a library
- push the fencedcode block handler up to the toplevel scanner so it
will handle blank lines inside the fence
- add a fenced code block with embedded html
- don't give a code block class if it's just an empty string
- add a test case for a piece of fenced code with trailing spaces after
the opening ~~~
- deal with cached text before handling fenced code blocks
- yank the repeated inline uncaches out and stuff them into a local function
- add two more tests (unfinished fenced code block, paragraph then
fenced code block) to codeblock.t
- don't publish mkd_string_to_anchor
- add an anchor format callback, plus add the -x option to the markdown
program to squash toc anchors to (close to) github compatability
- add some dle sanity checking into onlyifset()
- when dumping the parse tree, say which header is being dumped --
h1..h6 vs just header
- 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
- tweak how scalar headers are include in .in files
- support external code formatters
- add an external code block formatter to the markdown program
- mkd2html wasn't passing pgm to hoptusage()
- 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)
|
Log message:
Update to 2.2.4. From the changelog:
1. (bugfix) when splitting a line, null terminate the new line; also
don’t inherit the dle from the previous line
2. (bugfix) fix the broken footnote code; allow multi-paragraph
footnotes, not just one line of footnote.
3. (feature) support github checkbox list items (static configuration option)
a. --github-checkbox does the checkbox with html check entities
b. --github-checkbox=input does them with html <input> elements (set
to disabled so that people can’t check and uncheck willy-nilly)
4. (feature) on systems that support it, use the ‘destructor’
attribute on mkd_shlib_destructor() so it will run automatically when
the library unloads.
5. (feature) add --cxx-binding option to configure.sh to generate a
mkdio.h that’s got an extern "C" wrapper around it.
6. (tweak)delete HGROUP from the list of html5 elements, because the w3c
working group decided to punt it
The bugfix for not null-terminating a split line was reported by Github
user fCorleone, who was running a input mangler program (afl) to stress
discount by feeding random garbage to it. It saw that the splitline()
function (used when breaking out embedded chunks of html) was not
null-terminating the split line chunks, and was throwing errors on that.
(this is something that clang on modern macos catches if you use the
-fsanitize=address option.)
I never actually use footnotes, so I’d been running for about a decade
assuming that footnotes were one or maybe two lines, but github user
somasis pointed out that this was wrong wrong wrong! Ooops; at least it
was fixable w/o much pain and suffering.
HGROUP was caught by github user Crypto-Anarchist in their own branch of
discount, so I cherry-picked that changeset and pulled it back into the
mainline discount.
|
Log message:
Update to 2.2.3a. From the changelog:
2.2.3a:
2.2.3 has a configuration glitch (not properly testing for the
existance of S_ISSOCK, et seq) which 2.2.3a corrects. I also pulled
the plug on the single use of `alloca()` in `theme.c` (Windows MinGW
doesn't support it properly(?) and in this one case I'm better off
just `malloc()`ing the offending thing and letting it be garbage
collected when the program finishes.)
2.2.3:
I turn around and blink, and suddenly 13 months have done by while
I slowly tested various beta versions of 2.2.3, and now it's 2018
and a small collection of cosmetic, portability, and build tweaks,
plus some and actually bad bugs have been cleaned up:
1. Have `tools/branch` be a no-op if there's no git
that I can use to check for my SCCS status.
2. Add user-contributed cmake support
3. check for non-null T(link) in the safelink function; rename
paranoia.t to safelink.t, add a couple more tests for safelinks
4. tweak the safelink detection code to allow more types of url fragments
5. when finding the installer, check that -s works (doesn't work on Minix 3?)
6. Correct makepage & theme to use the new set_flag() return scheme
(0==success, !0==pointer to bogus flag)
7. 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.
8. Tweak the install rule to install a GNU-style .pc file iff
@MK_PKGCONFIG@ is not defined as #
9. Hand-resolve a conflict in the msvc Makefile
10. Add in paranoid list splitting [EXPLICITLIST] (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.
11. Create a utility function [`notspecial()`] for theme & mkd2html --
check a filename to see if it's a special file that doesn't need to
be deleted or to have a .html suffix added to it. It only works on
machines that have a stat() system call + the S_ISFIFO, S_ISCHR, and
S_ISSOCK macros, otherwise it thinks that nothing is special.
12. Add a README for the utilities in the tools subdirectory
13. Add the git branch name into the version string if we're not on the
master branch.
14. Add support for NMAKE and Visual C++ toolset.
(courtesy of Martin Hofmann (tin-pot) fork of Discount).
15. Add a 'dirty' flag to the Document structure & set it whenever a
callback changes (github issue #136) so that the next mkd_compile
will regenerate the document.
16. Tweak superscript handling to be able to superscript something wrapped in html
17. 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.)
18. Process html blocks in compile (as well as in compile_document();
`compile_document()` needs to handle `<style>` blocks and
`compile()` needs to handle html blocks that are nested inside
blockquotes, tables, lists, &tc.
19. Add --h1-title as an option to configure.sh; this enables code that uses
the first h1 in a document as the document title (in mkd2html & theme)
20. add `gethopt()` -- a q&d getopt clone that
accepts both full-word & single character options -- instead of doing
kludgy bespoke argument parsing in mkd2html & theme.
2.2.2:
A few months worth of bugfixes, mainly for annoying bugs but one
for a serious one:
* In `mkd_line()` I was doing a sneaky hack to take the rendered text
out of the MMIOT it was in which was fine if I was building discount
w/o `--with-amalloc`, but horribly wrong `--with-amalloc`; the return
from `mkd_line()` is a freeable string, so my sneak (I was pulling
the contents of the rendered string out, then zeroing the pointers
in the MMIOT; if amalloc was active, the rendered string was in the
middle of a allocated block which could not be freed (and would cause
core dumps on some systems. Kludges _always_ come back to bite you
in the ass)) was terribly terribly wrong.
* Redo toc anchor generation to reduce namespace collisions (by encoding
out of namespace characters to -XX- hex sequences (except space, which
encodes to just -) in html4, %XX in html5 (formerly urlencodedanchor)).
* Add html5anchor as a synonym for urlencodedanchor (urlencoded is
depreciated, but will stick around like an unwelcome guest until
the next major release) now that I'm doing html5 encoding there.
* When generating a TOC, don't anchor-encode the human-readable
contents of the links .
* "quote" "everything" "when" "I" \
"generate" "librarian.sh"
* Horrifying kludge to deal with destination directories with
spaces in them;
1. quote filename arguments to AC_SUB (via the __ac_quote builtin), and
2. instead of using the shell to check for sed substitute markers (if I
do `echo "$*" | sed -e 's/;/\\;/'` it collapses a layer
of backslashes needlessly. It's awful enough to do
`echo $* | sed -e 's/ /\\\\ /'`
(so sed won't eat the backslashes) but to do
`sed -e 's/ /\\\\\\\\ /'`
to keep sed + the shell from eating the backslashes is just
appalling) I generate the little C program `config.sed`, which
generates the sed pattern, escaping the `;` and NOT collapsing
backslashes.
Ugh. It's all pretty gross, but it looks like it works? At least
for discount.
* Always have `mkd_xmlpage()` generate a title element, even if it's empty
* Add `<form>` ... `</form>` to the set of known block tags
* Use `\r` instead of `^C` for the internal hard end of line marker
(which means if I don't unescape it when rendering it won't leave
`^C` poop in the output.)
* Bring the installation instructions a little closer to up to date.
* When there's either `pkg-config` on the system or if the configure
option `--pkg-config` is used, generate a pkgconfig `.pc` file.
2.2.1:
A few months of small bugfixes, a few tweaks, and some more conversion of
static flags to runtime ones.
* Update the muñoz test case for a text fragment with an 0xff
* 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 muñoz.t (which
tripped the 0xff becomes EOF bug) so that
test needed to be rewritten.
* Have `configure.sh` not do the `WinDef.h` short circuit
* include `"config.h"` to pick up the definition of `DWORD/WORD/BYTE`
(windows support) & add a new label field for better TOC
label generation
* Wasn't updating `config.sub` with {scalar_type}->{scalar_type} on
windows machines.
* Tweak `mkd_xmlpage()` so that it only uses the published interface.
* Eat one of the two remaining flag bits (`flag_t` structure
-- or 64-bit int, which isn't portable to old Unices -- here we
come!) to make LaTeX support a runtime flag.
* Add some missing dependencies to the makefile
* In makepage, I was using the wrong argument for the file to make
a page from. needed to check for `argc > 0` & `argv[0]` (after
shifting argc/argv by optind) but was checking `argc > 1` &
`argv[1]`, which was something less than useful.
* Strip out `--enable-all-features` from `configure.sh`
(obsolete now after the mass conversion of features from
compile-time to run-time.)
* Add `config.h` to the includes for amalloc (for the if `#define`
to make clang stfu)
2.2.0:
Many **MANY** tweaks over the last year, including...
* mathjax support (--with-latex -- changed to the runtime flag
`MKD_LATEX` in [2.2.1](#v2.2.1)) (`$$..$$`, `\(..\)`, and `\[..\]`,
not `$..$`))
* make the `amalloc()` paranoia malloc library even more paranoid by
putting markers at the start _and_ the end of each allocated block.
* Redo comment block handling; standard markdown only treats comments as
block html if the start comment marker starts at the beginning of a line
and the end comment marker is at the end of a line.
* clean up broken and insufficiently paranoid parts of `configure.inc`
* When attempting to match the closing tag of an html block, don't
advance the match index unless that character actually matches.
(defect: `<p></>*` was splitting into 2 lines when it should have
generated `<p><p></>*</p>`)
* if `mkd_compile()` is called multiple times, actually recompile the
document if the flags change.
* When processing automatic links, explicitly allow extended utf-8 characters
as part of the url.
* Tweak `configure.inc` to quote `__cwd` & `__d` so that a `$__cwd` with
spaces in the path won't make `configure.sh` (or `make install`) puke
* messed up the `fwrite()` error check in `mkd_generatehtml()`,
* return EOF instead of -1 on error in `mkd_xhtmlpage()`,
* if the mkd output fails, exit with nonzero status
* Handle error conditions and pass errorcodes out of various
`mkd_xxx()` output functions (inspired by a patch written by
Koen Punt)
* in `mkd_document()` don't pad the generated html with a 0 unless it's
actually generated.
* If the C compiler generates .dSYM directories, get rid of them during
distclean
* Change the `configure.sh` message for the `--with-`(foo) variables to
reflect what it's actually doing with them.
* Theme really wants the old behavior of `--with-`(foo), so pass those
settings into theme in a #define
* Have `configure.sh` just state that an option is not supported instead
of dying.
* Convert many configure-time settings to runtime flags
* Manpage editing by Nathan Phillip Brink
* Update plan9 support.
|
Log message:
Update textproc/discount to discount-2.1.8a.
Patch provided by Derouiche in PR pkg/50404.
Changes:
o version 2.1.8a When I put in the patch to ..
# Change the mail demangler to a debian-specific 'always mangle
one way' hack. (enabled with the configure.sh option
--debian-glitch)
I messed up the format string and made the mangled email address
into a fixed bogus string. Sigh. Fixed (thanks to a patch from
Alessandro Ghedini), updated (and I really have to expand the
runtime configuration flags array to be long enough to fit 64
settings, but that?s a fix for a different day) and released.
o version 2.1.8 After a year or so of letting the code sit and slowly
accumulate fixes, a new version which fixes a wad of bugs and adds
a few new features. Some of this code is front other people, and
those changes will be marked with their names:
# FINALLY address the bug where markdown extra-style 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.
# Fix makefile distclean to cleanup all the generated files and
corrected the names of the installed sample program man pages
to end in .1 (Mark Pizzolato mark@infocomm.com)
# Change the mail demangler to a debian-specific 'always mangle
one way' hack. (enabled with the configure.sh option
--debian-glitch)
# Add --with-unmangled-email compile-time flag to disable mailto:
mangling
# Allow the magic output filename -, which means send output to
stdout instead of to a file.
# Fix a bug where autolink + github flavored markdown absorbs the
^C eoln character into a link at the end of a line.
# Tweak install.samples so that the user can supply a SAMPLE_PFX
on the command line SAMPLE_PFX=discount- make install.samples
to install the sample programs with a package-specific prefix.
# Emit pages in utf-8 instead of us-ascii (simply a change to the
Content-Type meta) (Nathan Phillip Brink binki@gentoo.org)
# Patch the horrible list handler to support long numeric list
items (George Hartzell hartzell@alerce.com)
# Various bugfixes (Masayoshi Sekimura sekimura@gmail.com)
# Fix support for CFLAGS=-m32 ./configure.sh by using CFLAGS for
all build invokations of CC. (Nathan Phillip Brink
binki@gentoo.org)
# Github-style language attributes on fenced code blocks (Loren
Segal lsegal@amazon.com)
# When defining WORD & DWORD, check first for the MS Windows
WinDef.h file; if found, include it instead of defining WORD &
DWORD ourselves.
# support url-encoded anchor links with --with-urlencoded-anchor
option (Daisuke Murase typester@cpan.org)
|
Log message:
Import discount-2.1.6 as textproc/discount, packaged for wip
by zecrazytux and fhajny.
Markdown is a text-to-HTML conversion tool for web writers. Markdown
allows you to write using an easy-to-read, easy-to-write plain text
format, then convert it to structurally valid XHTML (or HTML).
The overriding design goal for Markdown's formatting syntax is to make
it as readable as possible. The idea is that a Markdown-formatted
document should be publishable as-is, as plain text, without looking
like it's been marked up with tags or formatting instructions. While
Markdown's syntax has been influenced by several existing text-to-HTML
filters, the single biggest source of inspiration for Markdown's
syntax is the format of plain text email.
Original Markdown implementation is written in Perl. Discount provides a
Markdown CLI tool and a library, written in C.
|