DR-SunDown

 view release on metacpan or  search on metacpan

sundown/README.markdown  view on Meta::CPAN

	`Sundown` has been extensively security audited, and includes protection against
	all possible DOS attacks (stack overflows, out of memory situations, malformed
	Markdown syntax...) and against client attacks through malicious embedded HTML.

	We've worked very hard to make `Sundown` never crash or run out of memory
	under *any* input. `Sundown` renders all the Markdown content in GitHub and so
	far hasn't crashed a single time.

*	**Customizable renderers**

	`Sundown` is not stuck with XHTML output: the Markdown parser of the library
	is decoupled from the renderer, so it's trivial to extend the library with
	custom renderers. A fully functional (X)HTML renderer is included.

*	**Optimized for speed**

	`Sundown` is written in C, with a special emphasis on performance. When wrapped
	on a dynamic language such as Python or Ruby, it has shown to be up to 40
	times faster than other native alternatives.

*	**Zero-dependency**

sundown/README.markdown  view on Meta::CPAN


*	Whitespace characters outside of the U+007F codepoint are not considered as
	whitespace. They are considered as normal, in-word characters for word-boundary checks.

Install
-------

There is nothing to install. `Sundown` is composed of 3 `.c` files (`markdown.c`,
`buffer.c` and `array.c`), so just throw them in your project. Zero-dependency means
zero-dependency. You might want to include `render/html.c` if you want to use the
included XHTML renderer, or write your own renderer. Either way, it's all fun and joy.

If you are hardcore, you can use the included `Makefile` to build `Sundown` into a dynamic
library, or to build the sample `sundown` executable, which is just a commandline
Markdown to XHTML parser. (If gcc gives you grief about `-fPIC`, e.g. with MinGW, try
`make MFLAGS=` instead of just `make`.)

License
-------

Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES

sundown/html/html.h  view on Meta::CPAN


typedef enum {
	HTML_SKIP_HTML = (1 << 0),
	HTML_SKIP_STYLE = (1 << 1),
	HTML_SKIP_IMAGES = (1 << 2),
	HTML_SKIP_LINKS = (1 << 3),
	HTML_EXPAND_TABS = (1 << 4),
	HTML_SAFELINK = (1 << 5),
	HTML_TOC = (1 << 6),
	HTML_HARD_WRAP = (1 << 7),
	HTML_USE_XHTML = (1 << 8),
	HTML_ESCAPE = (1 << 9),
} html_render_mode;

typedef enum {
	HTML_TAG_NONE = 0,
	HTML_TAG_OPEN,
	HTML_TAG_CLOSE,
} html_tag;

int



( run in 1.493 second using v1.01-cache-2.11-cpan-49f99fa48dc )