./textproc/discount, Markdown C implementation

[ CVSweb ] [ Homepage ] [ RSS ] [ Required by ] [ Add to tracker ]


Branch: CURRENT, Version: 2.2.6, Package name: discount-2.2.6, Maintainer: zecrazytux

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.


Required to build:
[pkgtools/cwrappers]

Master sites:

SHA1: 36aeb512a4429e3a672f5e6803dcd59d5ac1a817
RMD160: ebd9a877842998afda0d0f1a2821280b16c9d16e
Filesize: 125.771 KB

Version history: (Expand)


CVS history: (Expand)


   2019-06-11 12:03:07 by Leonardo Taccari | Files touched by this commit (2)
Log message:
discount: Simplify distfile handling
   2019-06-10 15:32:56 by Amitai Schleier | Files touched by this commit (4) | Package updated
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)
   2018-08-27 22:46:19 by Amitai Schleier | Files touched by this commit (2) | Package updated
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.
   2018-07-27 17:50:45 by Amitai Schleier | Files touched by this commit (3) | Package updated
Log message:
Cast another unsigned char to fix self-tests on NetBSD 8. Bump PKGREVISION.
   2018-04-23 16:42:03 by Amitai Schleier | Files touched by this commit (3)
Log message:
Accomplish libtoolization with less patching.
   2018-03-17 21:54:06 by Amitai Schleier | Files touched by this commit (3) | Package updated
Log message:
Cast tolower/isspace/isalpha args to unsigned char to fix self-tests on
NetBSD. Bump PKGREVISION.
   2018-03-16 04:45:18 by Amitai Schleier | Files touched by this commit (4) | Package updated
Log message:
Libtoolize for portability across pkgsrc platforms. Bump PKGREVISION.
   2018-03-10 06:37:45 by Amitai Schleier | Files touched by this commit (5) | Package updated
Log message:
Build and install shared library. Bump PKGREVISION.