GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Markdown::Render(3) User Contributed Perl Documentation Markdown::Render(3)

Markdown::Render - Render markdown as HTML

 use Markdown::Render;
 my $md = Markdown::Render->new( infile => 'README.md');
 $md->render_markdown->print_html;

...or from the command line to create HTML

 md-utils.pl -r README.md > README.html

...or from the command line to replace render custom tags

 md-utils.pl README.md.in > README.md

Renders markdown as HTML using either GitHub's API or Text::Markdown::Discount. Optionally adds additional metadata to markdown document using custom tags.

See README.md <https://github.com/rlauer6/markdown-utils/blob/master/README.md> for more details.

Note: This module originally used Text::Markdown as an alternative to using the GitHub API however, there are too many bugs and idiosyncracies in that module. This module will now use Text::Markdown::Discount which is not only faster, but seems to be more compliant with GFM.

Note: Text::Markdown::Discount relies on the text-markdown library which did not actually support all of the markdown features (including code fencing). You can find an updated version of Text::Markdown::Discount here: <https://github.com/rlauer6/text-markdown-discount>

 new( options )

Any of the options passed to the "new" method can also be set or retrieved use the "set_NAME" or "get_NAME" methods.

URL of a CSS file to add to head section of printed HTML.
One of "github" or "text_markdown".

default: github

Name of the git user that is used in the "GIT_USER" tag.
Email address of the git user that is used in the "GIT_EMAIL" tag.
Path to a file in markdow format.
Text of the markdown to be rendered.
If using the GitHub API, mode can be either "gfm" or "markdown".

default: markdown

Boolean that indicates that no title should be added to the table of contents.

default: false

Title to be used for the table of contents.

Updates the markdown by interpolating the custom keywords. Invoking this method will create a table of contents and replace keywords with their values.

Invoke this method prior to invoking "render_markdown".

Returns the Markdown::Render object.

Passes the markdown to GitHub's markdown rendering engine. After invoking this method you can retrieve the processed html by invoking "get_html" or create a fully rendered HTML page using the "print_html" method.

Returns the Markdown::Render object.

 print_html(options)

Outputs the fully rendered HTML page.

URL of a CSS style sheet to include in the head section. If no CSS file option is passed a default CSS file will b used. If a CSS element is passed but it is undefined or empty, then no CSS will be specified in the final document.
Title to be added in the head section of the document. If no title option is passed the name of the file will be use as the title. If an title option is passed but is undefined or empty, no title element will be added to the document.

Rob Lauer - rlauer6@comcast.net

GitHub Markdown API <https://docs.github.com/en/rest/markdown> Text::Markdown::Discount

2024-11-27 perl v5.40.2

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.