-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update the documentation for the release of the 1.0 version.
- Loading branch information
Showing
10 changed files
with
155 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Revision history for pmarkdown and the Markdown::Perl module. | ||
|
||
1.00 - 2024-03-31 | ||
|
||
- Initial release with full support for the CommonMark spec, the GitHub | ||
Flavored Markdown extentions, and partial support for original Markdown | ||
syntax. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,3 +36,5 @@ | |
^nytprof.out$ | ||
^nytprof/ | ||
^build/ | ||
^.*\.code-workspace$ | ||
^README\.md$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ WriteMakefile( | |
DISTNAME => 'Markdown-Perl', | ||
AUTHOR => q{Mathias Kende <[email protected]>}, | ||
VERSION_FROM => 'lib/Markdown/Perl.pm', | ||
ABSTRACT => q{Very configurable Markdown processor written in pure Perl}, | ||
ABSTRACT => q{Very configurable Markdown processor written in pure Perl, supporting the CommonMark spec and many extensions}, | ||
LICENSE => 'mit', | ||
EXE_FILES => ['script/pmarkdown',], | ||
MIN_PERL_VERSION => '5.026', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -192,30 +192,35 @@ __END__ | |
=head1 NAME | ||
Markdown::Perl – Very configurable Markdown processor written in pure Perl | ||
Markdown::Perl – Very configurable Markdown processor written in pure Perl, | ||
supporting the CommonMark spec and many extensions. | ||
=head1 SYNOPSIS | ||
This is the library underlying the L<pmarkdown> tool. | ||
=head1 DESCRIPTION | ||
This is the library underlying the L<pmarkdown> tool. It can be used in an | ||
object-oriented style: | ||
use Markdown::Perl; | ||
my $converter = Markdown::Perl->new([mode => $mode], %options); | ||
my $html = $converter->convert($markdown); | ||
Or you can use the library functionally: | ||
Or the library can be used functionally: | ||
use Markdown::Perl 'convert'; | ||
Markdown::Perl::set_options([mode => $mode], %options); | ||
my $html = convert($markdown); | ||
=head1 METHODS | ||
=head1 DESCRIPTION | ||
=head2 new | ||
my $pmarkdown = Markdown::Perl->new([mode => $mode], %options); | ||
Creates a C<Markdown::Perl> object that can be used to convert Markdown data | ||
into HTML. Note that you don’t have to create an instance of this class to use | ||
this module. The methods of this class can also be used like package functions | ||
and they will operate on an implicit default instance of the class. | ||
See the L<pmarkdown/MODES> page for the documentation of existing modes. | ||
See the L<Markdown::Perl::Options> documentation for all the existing options. | ||
|
@@ -226,21 +231,40 @@ See the L<Markdown::Perl::Options> documentation for all the existing options. | |
Markdown::Perl::set_options(%option); | ||
Sets the options of the current object or, for the functional version, the | ||
options used by functional calls to C<convert>. The options set through the | ||
options used by functional calls to convert(). The options set through the | ||
functional version do B<not> apply to any objects created through a call to | ||
C<new>. | ||
new(). | ||
See the L<Markdown::Perl::Options> documentation for all the existing options. | ||
=head2 set_mode | ||
See the L<pmarkdown/MODES> page for the documentation of existing modes. | ||
$pmarkdown->set_mode($mode); | ||
Markdown::Perl::set_mode($mode); | ||
Specifies a I<mode> for the current object or, for the functional version, the | ||
mode used by functional calls to convert(). A mode is a set of configuration | ||
options working together, typically to replicate the semantics of another | ||
existing Markdown processor. See the L<pmarkdown/MODES> documentation for a list | ||
of available modes. | ||
When a mode is applied, it sets specific values for some options but any value | ||
for these options set through the set_options() will take precedence, even if | ||
set_options() is called before set_mode(). The mode set through the functional | ||
version does B<not> apply to any objects created through a call to new(). | ||
=head2 convert | ||
my $html = $pmarkdown->convert($md); | ||
my $html = Markdown::Perl::convert($md); | ||
Converts the given $md string into HTML. The input string must be a decoded | ||
Unicode string (or an ASCII string) and the output is similarly a decoded | ||
Unicode string. | ||
=head1 AUTHOR | ||
Mathias Kende | ||
Mathias Kende <[email protected]> | ||
=head1 COPYRIGHT AND LICENSE | ||
|
@@ -272,6 +296,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
=item L<Text::Markdown> another pure Perl implementation, implementing the | ||
original Markdown syntax from L<http://daringfireball.net/projects/markdown>. | ||
=item L<CommonMark> a wrapper around the official CommonMark C library. | ||
=back | ||
=cut |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters