Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

markdown(3) [debian man page]

MARKDOWN(3)						   BSD Library Functions Manual 					       MARKDOWN(3)

NAME
markdown -- process Markdown documents LIBRARY
Markdown (libmarkdown, -lmarkdown) SYNOPSIS
#include <mkdio.h> MMIOT *mkd_in(FILE *input, int flags); MMIOT *mkd_string(char *string, int size, int flags); int markdown(MMIOT *doc, FILE *output, int flags); DESCRIPTION
These functions convert Markdown documents and strings into HTML. markdown() processes an entire document, while mkd_text() processes a sin- gle string. To process a file, you pass a FILE* to mkd_in(), and if it returns a nonzero value you pass that in to markdown(), which then writes the con- verted document to the specified FILE*. If your input has already been written into a string (generated input or a file opened with mmap(2)) you can feed that string to mkd_string() and pass its return value to markdown.() Markdown() accepts the following flag values (or-ed together if needed) to restrict how it processes input: MKD_NOLINKS Don't do link processing, block <a> tags. MKD_NOIMAGE Don't do image processing, block <img>. MKD_NOPANTS Don't run smartypants(). MKD_NOHTML Don't allow raw html through AT ALL MKD_STRICT Disable superscript and relaxed emphasis. MKD_TAGTEXT Process text inside an html tag; no <em>, no <bold>, no html or [] expansion. MKD_NO_EXT Don't allow pseudo-protocols. MKD_CDATA Generate code for xml ![CDATA[...]]. MKD_NOSUPERSCRIPT Don't generate superscripts. Emphasis happens _everywhere_ MKD_NOTABLES Disallow tables. MKD_NOSTRIKETHROUGH Forbid ~~strikethrough~~. MKD_TOC Do table-of-contents processing. MKD_1_COMPAT Compatibility with MarkdownTest_1.0 MKD_AUTOLINK Make http://foo.com into a link even without <> s. MKD_SAFELINK Paranoid check for link protocol. MKD_NOHEADER Don't process header blocks. MKD_TABSTOP Expand tabs to 4 spaces. MKD_NODIVQUOTE Forbid >%class% blocks. MKD_NOALPHALIST Forbid alphabetic lists. MKD_NODLIST Forbid definition lists. MKD_EXTRA_FOOTNOTE Enable markdown extra-style footnotes. RETURN VALUES
markdown() returns 0 on success, 1 on failure. The mkd_in() and mkd_string() functions return a MMIOT* on success, null on failure. SEE ALSO
markdown(1), mkd-callbacks(3), mkd-functions(3), mkd-line(3), markdown(7), mkd-extensions(7), mmap(2). http://daringfireball.net/projects/markdown/syntax BUGS
Error handling is minimal at best. The MMIOT created by mkd_string() is deleted by the markdown function. Mastodon December 20, 2007 Mastodon

Check Out this Related Man Page

HTML::WikiConverter::Markdown(3pm)			User Contributed Perl Documentation			HTML::WikiConverter::Markdown(3pm)

NAME
HTML::WikiConverter::Markdown - Convert HTML to Markdown markup SYNOPSIS
use HTML::WikiConverter; my $wc = new HTML::WikiConverter( dialect => 'Markdown' ); print $wc->html2wiki( $html ); DESCRIPTION
This module contains rules for converting HTML into Markdown markup. You should not use this module directly; HTML::WikiConverter is the entry point for html->wiki conversion (eg, see synopsis above). See HTML::WikiConverter for additional usage details. ATTRIBUTES
In addition to the regular set of attributes recognized by the HTML::WikiConverter constructor, this dialect also accepts the following attributes that can be passed into the "new()" constructor. See "ATTRIBUTES" in HTML::WikiConverter for usage details. header_style Possible values: 'setext', 'atx'. Determines how headers "h1"-"h6" will be formatted. See <http://daringfireball.net/projects/markdown/syntax#header> for more information. Default is 'atx'. link_style Possible values: 'inline', 'reference'. See <http://daringfireball.net/projects/markdown/syntax#link> for more information. Default is 'reference'. force_inline_anchor_links Possible values: 0, 1. If enabled, links to anchors within the same page (eg, "#some-anchor") will always produce inline Markdown links, even under reference link style. This might be useful for building tables of contents. Default is 0. image_style Possible values: 'inline', 'reference'. See <http://daringfireball.net/projects/markdown/syntax#img> for more information. Default is 'reference'. image_tag_fallback Possible values: 0, 1. Markdown's image markup does not support image dimensions. If "image_tag_fallback" is enabled, image tags containing dimensional information (ie, width or height) will not be converted into Markdown markup. Rather, they will be roughly preserved in their HTML form. Default is 1. unordered_list_style Possible values: 'asterisk', 'plus', 'dash'. See <http://daringfireball.net/projects/markdown/syntax#list> for more information. Default is 'asterisk'. ordered_list_style Possible values: 'sequential', 'one-dot'. Markdown supports two different markups for ordered lists. Sequential style gives each list element its own ordinal number (ie, '1.', '2.', '3.', etc.). One-dot style gives each list element the same ordinal number (ie, '1.'). See <http://daringfireball.net/projects/markdown/syntax#list> for more information. Default is 'sequential'. AUTHOR
David J. Iberri, "<diberri at cpan.org>" BUGS
Please report any bugs or feature requests to "bug-html-wikiconverter-markdown at rt.cpan.org", or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=HTML-WikiConverter-Markdown>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. SUPPORT
You can find documentation for this module with the perldoc command. perldoc HTML::WikiConverter::Markdown You can also look for information at: o AnnoCPAN: Annotated CPAN documentation <http://annocpan.org/dist/HTML-WikiConverter-Markdown> o CPAN Ratings <http://cpanratings.perl.org/d/HTML-WikiConverter-Markdown> o RT: CPAN's request tracker <http://rt.cpan.org/NoAuth/Bugs.html?Dist=HTML-WikiConverter-Markdown> o Search CPAN <http://search.cpan.org/dist/HTML-WikiConverter-Markdown> COPYRIGHT &; LICENSE Copyright 2006 David J. Iberri, all rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.10.0 2008-07-13 HTML::WikiConverter::Markdown(3pm)
Man Page