15 Nov 2013 18:32:30 UTC
- Distribution: Text-Markdown-Discount
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (3)
- Testers (2850 / 393 / 1)
- KwaliteeBus factor: 1
- 87.50% Coverage
- License: unknown
- Activity24 month
- Download (172.94KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version
Markdown.pl - Convert Markdown syntax to (X)HTML
This program is distributed as part of Perl's Text::Markdown module, illustrating sample usage.
Markdown can be invoked on any file containing Markdown-syntax, and will produce the corresponding (X)HTML on STDOUT:
$ cat file.txt This is a *test*. Absolutely _nothing_ to see here. _Just a **test**_! * test * Yup, test. $ Markdown.pl file.txt <p>This is a <em>test</em>.</p> <p>Absolutely <em>nothing</em> to see here. <em>Just a <strong>test</strong></em>!</p> <ul> <li>test</li> <li>Yup, test.</li> </ul>
If no file is specified, it will expect its input from STDIN:
$ echo "A **simple** test" | markdown <p>A <strong>simple</strong> test</p>
Shows the full information for this version
Shows only the version number
Produce HTML 4-style tags instead of XHTML - XHTML requires elements that do not wrap a block (i.e. the
hrtag) to state they will not be closed, by closing with
/>. HTML 4-style will plainly output the tag as it comes:
$ echo '---' | markdown <hr /> $ echo '---' | markdown --html4tags <hr>
Shows this documentation
Copyright 2004 John Gruber
Copyright 2008 Tomas Doran
The manpage was written by Gunnar Wolf <firstname.lastname@example.org> for its use in Debian systems, but can be freely used elsewhere.
For full licensing information, please refer to Text::Markdown.pm's full documentation.
Module Install Instructions
To install Text::Markdown::Discount, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Text::Markdown::Discount
For more information on module installation, please visit the detailed CPAN module installation guide.