Markdent-0.33/0000755000175000017500000000000013420436470013047 5ustar autarchautarchMarkdent-0.33/bench/0000755000175000017500000000000013420436470014126 5ustar autarchautarchMarkdent-0.33/bench/capture-vs-text-markdown-vs-parse0000755000175000017500000000327313420436470022512 0ustar autarchautarch#!/usr/bin/perl use strict; use warnings; use lib './lib'; use Benchmark qw( cmpthese ); use Markdent::Handler::CaptureEvents; use Markdent::Handler::HTMLStream; use Markdent::Parser; use Storable qw( nfreeze thaw ); use Text::Markdown qw( markdown ); use File::Find qw( find ); use File::Slurp qw( read_file ); my $reps = shift || 10; my %files; find( { wanted => sub { return unless $File::Find::name =~ /\.text$/; $files{$File::Find::name} = read_file($File::Find::name); }, no_chdir => 1, }, 't/mdtest-data' ); my %captured; for my $file ( keys %files ) { my $ch = Markdent::Handler::CaptureEvents->new(); my $parser = Markdent::Parser->new( handler => $ch ); $parser->parse( markdown => $files{$file} ); $captured{$file} = nfreeze( $ch->captured_events() ); } cmpthese( $reps, { 'parse from scratch' => \&parse, 'replay from captured events' => \&replay, 'Text::Markdown' => \&tm, }, ); sub parse { for my $file ( keys %files ) { my $html = _html_handler(); my $parser = Markdent::Parser->new( handler => $html ); $parser->parse( markdown => $files{$file} ); } } sub replay { for my $file ( keys %files ) { my $html = _html_handler(); my $captured = thaw( $captured{$file} ); $captured->replay_events($html); } } sub _html_handler { my $buffer = q{}; open my $fh, '>', \$buffer or die $!; return Markdent::Handler::HTMLStream->new( title => 'Benchmark', output => $fh, ); } sub tm { for my $file ( keys %files ) { my $html = markdown( $files{$file} ); } } Markdent-0.33/Makefile.PL0000644000175000017500000000711413420436470015024 0ustar autarchautarch# This Makefile.PL for Markdent was generated by # Dist::Zilla::Plugin::DROLSKY::MakeMaker 1.01 # and Dist::Zilla::Plugin::MakeMaker::Awesome 0.42. # Don't edit it but the dist.ini and plugins used to construct it. use strict; use warnings; use 5.010; use ExtUtils::MakeMaker; my %WriteMakefileArgs = ( "ABSTRACT" => "An event-based Markdown parser toolkit", "AUTHOR" => "Dave Rolsky ", "CONFIGURE_REQUIRES" => { "ExtUtils::MakeMaker" => 0 }, "DISTNAME" => "Markdent", "EXE_FILES" => [ "bin/markdent-html" ], "LICENSE" => "perl", "MIN_PERL_VERSION" => "5.010", "NAME" => "Markdent", "PREREQ_PM" => { "Digest::SHA" => 0, "Encode" => 0, "Exporter" => 0, "File::Slurper" => 0, "Getopt::Long::Descriptive" => 0, "HTML::Entities" => 0, "IO::Handle" => 0, "List::AllUtils" => 0, "Module::Runtime" => 0, "Moose" => "2.1802", "Moose::Meta::Class" => 0, "Moose::Role" => 0, "MooseX::Getopt::Dashes" => 0, "MooseX::Getopt::OptionTypeMap" => 0, "MooseX::Role::Parameterized" => 0, "MooseX::SemiAffordanceAccessor" => "0.05", "MooseX::StrictConstructor" => "0.08", "Params::ValidationCompiler" => "0.14", "Scalar::Util" => 0, "Specio::Declare" => 0, "Specio::Exporter" => 0, "Specio::Library::Builtins" => 0, "Specio::Library::Numeric" => 0, "Tree::Simple" => 0, "Try::Tiny" => 0, "base" => 0, "namespace::autoclean" => "0.09", "parent" => 0, "re" => 0, "strict" => 0, "warnings" => 0 }, "TEST_REQUIRES" => { "Data::Dumper" => 0, "ExtUtils::MakeMaker" => 0, "File::Basename" => 0, "File::Find" => 0, "File::Spec" => 0, "File::Temp" => 0, "IO::File" => 0, "Test2::V0" => "0.000081", "Test::More" => "1.302015", "Test::Requires" => 0, "Tree::Simple::Visitor::ToNestedArray" => 0, "lib" => 0, "utf8" => 0 }, "VERSION" => "0.33", "test" => { "TESTS" => "t/*.t t/Handler/*.t t/Handler/HTMLStream/*.t t/Simple/*.t t/markup/github/*.t t/markup/multi-dialect/*.t t/markup/standard/*.t t/markup/theory/*.t" } ); my %FallbackPrereqs = ( "Data::Dumper" => 0, "Digest::SHA" => 0, "Encode" => 0, "Exporter" => 0, "ExtUtils::MakeMaker" => 0, "File::Basename" => 0, "File::Find" => 0, "File::Slurper" => 0, "File::Spec" => 0, "File::Temp" => 0, "Getopt::Long::Descriptive" => 0, "HTML::Entities" => 0, "IO::File" => 0, "IO::Handle" => 0, "List::AllUtils" => 0, "Module::Runtime" => 0, "Moose" => "2.1802", "Moose::Meta::Class" => 0, "Moose::Role" => 0, "MooseX::Getopt::Dashes" => 0, "MooseX::Getopt::OptionTypeMap" => 0, "MooseX::Role::Parameterized" => 0, "MooseX::SemiAffordanceAccessor" => "0.05", "MooseX::StrictConstructor" => "0.08", "Params::ValidationCompiler" => "0.14", "Scalar::Util" => 0, "Specio::Declare" => 0, "Specio::Exporter" => 0, "Specio::Library::Builtins" => 0, "Specio::Library::Numeric" => 0, "Test2::V0" => "0.000081", "Test::More" => "1.302015", "Test::Requires" => 0, "Tree::Simple" => 0, "Tree::Simple::Visitor::ToNestedArray" => 0, "Try::Tiny" => 0, "base" => 0, "lib" => 0, "namespace::autoclean" => "0.09", "parent" => 0, "re" => 0, "strict" => 0, "utf8" => 0, "warnings" => 0 ); unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) { delete $WriteMakefileArgs{TEST_REQUIRES}; delete $WriteMakefileArgs{BUILD_REQUIRES}; $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs; } delete $WriteMakefileArgs{CONFIGURE_REQUIRES} unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; WriteMakefile(%WriteMakefileArgs); Markdent-0.33/META.yml0000644000175000017500000007527213420436470014335 0ustar autarchautarch--- abstract: 'An event-based Markdown parser toolkit' author: - 'Dave Rolsky ' build_requires: Data::Dumper: '0' ExtUtils::MakeMaker: '0' File::Basename: '0' File::Find: '0' File::Spec: '0' File::Temp: '0' IO::File: '0' Test2::V0: '0.000081' Test::More: '1.302015' Test::Requires: '0' Tree::Simple::Visitor::ToNestedArray: '0' lib: '0' utf8: '0' configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 0 generated_by: 'Dist::Zilla version 6.012, CPAN::Meta::Converter version 2.150010' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: Markdent provides: Markdent: file: lib/Markdent.pm version: '0.33' Markdent::CLI: file: lib/Markdent/CLI.pm version: '0.33' Markdent::CapturedEvents: file: lib/Markdent/CapturedEvents.pm version: '0.33' Markdent::CheckedOutput: file: lib/Markdent/CheckedOutput.pm version: '0.33' Markdent::Dialect::GitHub::BlockParser: file: lib/Markdent/Dialect/GitHub/BlockParser.pm version: '0.33' Markdent::Dialect::GitHub::SpanParser: file: lib/Markdent/Dialect/GitHub/SpanParser.pm version: '0.33' Markdent::Dialect::Theory::BlockParser: file: lib/Markdent/Dialect/Theory/BlockParser.pm version: '0.33' Markdent::Dialect::Theory::SpanParser: file: lib/Markdent/Dialect/Theory/SpanParser.pm version: '0.33' Markdent::Event::AutoLink: file: lib/Markdent/Event/AutoLink.pm version: '0.33' Markdent::Event::CodeBlock: file: lib/Markdent/Event/CodeBlock.pm version: '0.33' Markdent::Event::EndBlockquote: file: lib/Markdent/Event/EndBlockquote.pm version: '0.33' Markdent::Event::EndCode: file: lib/Markdent/Event/EndCode.pm version: '0.33' Markdent::Event::EndDocument: file: lib/Markdent/Event/EndDocument.pm version: '0.33' Markdent::Event::EndEmphasis: file: lib/Markdent/Event/EndEmphasis.pm version: '0.33' Markdent::Event::EndHTMLTag: file: lib/Markdent/Event/EndHTMLTag.pm version: '0.33' Markdent::Event::EndHeader: file: lib/Markdent/Event/EndHeader.pm version: '0.33' Markdent::Event::EndLink: file: lib/Markdent/Event/EndLink.pm version: '0.33' Markdent::Event::EndListItem: file: lib/Markdent/Event/EndListItem.pm version: '0.33' Markdent::Event::EndOrderedList: file: lib/Markdent/Event/EndOrderedList.pm version: '0.33' Markdent::Event::EndParagraph: file: lib/Markdent/Event/EndParagraph.pm version: '0.33' Markdent::Event::EndStrong: file: lib/Markdent/Event/EndStrong.pm version: '0.33' Markdent::Event::EndTable: file: lib/Markdent/Event/EndTable.pm version: '0.33' Markdent::Event::EndTableBody: file: lib/Markdent/Event/EndTableBody.pm version: '0.33' Markdent::Event::EndTableCell: file: lib/Markdent/Event/EndTableCell.pm version: '0.33' Markdent::Event::EndTableHeader: file: lib/Markdent/Event/EndTableHeader.pm version: '0.33' Markdent::Event::EndTableRow: file: lib/Markdent/Event/EndTableRow.pm version: '0.33' Markdent::Event::EndUnorderedList: file: lib/Markdent/Event/EndUnorderedList.pm version: '0.33' Markdent::Event::HTMLBlock: file: lib/Markdent/Event/HTMLBlock.pm version: '0.33' Markdent::Event::HTMLComment: file: lib/Markdent/Event/HTMLComment.pm version: '0.33' Markdent::Event::HTMLCommentBlock: file: lib/Markdent/Event/HTMLCommentBlock.pm version: '0.33' Markdent::Event::HTMLEntity: file: lib/Markdent/Event/HTMLEntity.pm version: '0.33' Markdent::Event::HTMLTag: file: lib/Markdent/Event/HTMLTag.pm version: '0.33' Markdent::Event::HorizontalRule: file: lib/Markdent/Event/HorizontalRule.pm version: '0.33' Markdent::Event::Image: file: lib/Markdent/Event/Image.pm version: '0.33' Markdent::Event::LineBreak: file: lib/Markdent/Event/LineBreak.pm version: '0.33' Markdent::Event::Preformatted: file: lib/Markdent/Event/Preformatted.pm version: '0.33' Markdent::Event::StartBlockquote: file: lib/Markdent/Event/StartBlockquote.pm version: '0.33' Markdent::Event::StartCode: file: lib/Markdent/Event/StartCode.pm version: '0.33' Markdent::Event::StartDocument: file: lib/Markdent/Event/StartDocument.pm version: '0.33' Markdent::Event::StartEmphasis: file: lib/Markdent/Event/StartEmphasis.pm version: '0.33' Markdent::Event::StartHTMLTag: file: lib/Markdent/Event/StartHTMLTag.pm version: '0.33' Markdent::Event::StartHeader: file: lib/Markdent/Event/StartHeader.pm version: '0.33' Markdent::Event::StartLink: file: lib/Markdent/Event/StartLink.pm version: '0.33' Markdent::Event::StartListItem: file: lib/Markdent/Event/StartListItem.pm version: '0.33' Markdent::Event::StartOrderedList: file: lib/Markdent/Event/StartOrderedList.pm version: '0.33' Markdent::Event::StartParagraph: file: lib/Markdent/Event/StartParagraph.pm version: '0.33' Markdent::Event::StartStrong: file: lib/Markdent/Event/StartStrong.pm version: '0.33' Markdent::Event::StartTable: file: lib/Markdent/Event/StartTable.pm version: '0.33' Markdent::Event::StartTableBody: file: lib/Markdent/Event/StartTableBody.pm version: '0.33' Markdent::Event::StartTableCell: file: lib/Markdent/Event/StartTableCell.pm version: '0.33' Markdent::Event::StartTableHeader: file: lib/Markdent/Event/StartTableHeader.pm version: '0.33' Markdent::Event::StartTableRow: file: lib/Markdent/Event/StartTableRow.pm version: '0.33' Markdent::Event::StartUnorderedList: file: lib/Markdent/Event/StartUnorderedList.pm version: '0.33' Markdent::Event::Text: file: lib/Markdent/Event/Text.pm version: '0.33' Markdent::Handler::CaptureEvents: file: lib/Markdent/Handler/CaptureEvents.pm version: '0.33' Markdent::Handler::HTMLFilter: file: lib/Markdent/Handler/HTMLFilter.pm version: '0.33' Markdent::Handler::HTMLStream::Document: file: lib/Markdent/Handler/HTMLStream/Document.pm version: '0.33' Markdent::Handler::HTMLStream::Fragment: file: lib/Markdent/Handler/HTMLStream/Fragment.pm version: '0.33' Markdent::Handler::MinimalTree: file: lib/Markdent/Handler/MinimalTree.pm version: '0.33' Markdent::Handler::Multiplexer: file: lib/Markdent/Handler/Multiplexer.pm version: '0.33' Markdent::Handler::Null: file: lib/Markdent/Handler/Null.pm version: '0.33' Markdent::Parser: file: lib/Markdent/Parser.pm version: '0.33' Markdent::Parser::BlockParser: file: lib/Markdent/Parser/BlockParser.pm version: '0.33' Markdent::Parser::SpanParser: file: lib/Markdent/Parser/SpanParser.pm version: '0.33' Markdent::Regexes: file: lib/Markdent/Regexes.pm version: '0.33' Markdent::Role::AnyParser: file: lib/Markdent/Role/AnyParser.pm version: '0.33' Markdent::Role::BalancedEvent: file: lib/Markdent/Role/BalancedEvent.pm version: '0.33' Markdent::Role::BlockParser: file: lib/Markdent/Role/BlockParser.pm version: '0.33' Markdent::Role::DebugPrinter: file: lib/Markdent/Role/DebugPrinter.pm version: '0.33' Markdent::Role::Dialect::BlockParser: file: lib/Markdent/Role/Dialect/BlockParser.pm version: '0.33' Markdent::Role::Dialect::SpanParser: file: lib/Markdent/Role/Dialect/SpanParser.pm version: '0.33' Markdent::Role::Event: file: lib/Markdent/Role/Event.pm version: '0.33' Markdent::Role::EventAsText: file: lib/Markdent/Role/EventAsText.pm version: '0.33' Markdent::Role::EventsAsMethods: file: lib/Markdent/Role/EventsAsMethods.pm version: '0.33' Markdent::Role::FilterHandler: file: lib/Markdent/Role/FilterHandler.pm version: '0.33' Markdent::Role::HTMLStream: file: lib/Markdent/Role/HTMLStream.pm version: '0.33' Markdent::Role::Handler: file: lib/Markdent/Role/Handler.pm version: '0.33' Markdent::Role::Simple: file: lib/Markdent/Role/Simple.pm version: '0.33' Markdent::Role::SpanParser: file: lib/Markdent/Role/SpanParser.pm version: '0.33' Markdent::Simple::Document: file: lib/Markdent/Simple/Document.pm version: '0.33' Markdent::Simple::Fragment: file: lib/Markdent/Simple/Fragment.pm version: '0.33' Markdent::Types: file: lib/Markdent/Types.pm version: '0.33' Markdent::Types::Internal: file: lib/Markdent/Types/Internal.pm version: '0.33' requires: Digest::SHA: '0' Encode: '0' Exporter: '0' File::Slurper: '0' Getopt::Long::Descriptive: '0' HTML::Entities: '0' IO::Handle: '0' List::AllUtils: '0' Module::Runtime: '0' Moose: '2.1802' Moose::Meta::Class: '0' Moose::Role: '0' MooseX::Getopt::Dashes: '0' MooseX::Getopt::OptionTypeMap: '0' MooseX::Role::Parameterized: '0' MooseX::SemiAffordanceAccessor: '0.05' MooseX::StrictConstructor: '0.08' Params::ValidationCompiler: '0.14' Scalar::Util: '0' Specio::Declare: '0' Specio::Exporter: '0' Specio::Library::Builtins: '0' Specio::Library::Numeric: '0' Tree::Simple: '0' Try::Tiny: '0' base: '0' namespace::autoclean: '0.09' parent: '0' perl: '5.010' re: '0' strict: '0' warnings: '0' resources: bugtracker: https://github.com/houseabsolute/Markdent/issues homepage: http://metacpan.org/release/Markdent repository: git://github.com/houseabsolute/Markdent.git version: '0.33' x_Dist_Zilla: perl: version: '5.026002' plugins: - class: Dist::Zilla::Plugin::Git::GatherDir config: Dist::Zilla::Plugin::GatherDir: exclude_filename: - CODE_OF_CONDUCT.md - CONTRIBUTING.md - LICENSE - Makefile.PL - README.md - cpanfile exclude_match: [] follow_symlinks: 0 include_dotfiles: 0 prefix: '' prune_directory: [] root: . Dist::Zilla::Plugin::Git::GatherDir: include_untracked: 0 name: '@DROLSKY/Git::GatherDir' version: '2.045' - class: Dist::Zilla::Plugin::ManifestSkip name: '@DROLSKY/ManifestSkip' version: '6.012' - class: Dist::Zilla::Plugin::License name: '@DROLSKY/License' version: '6.012' - class: Dist::Zilla::Plugin::ExecDir name: '@DROLSKY/ExecDir' version: '6.012' - class: Dist::Zilla::Plugin::ShareDir name: '@DROLSKY/ShareDir' version: '6.012' - class: Dist::Zilla::Plugin::Manifest name: '@DROLSKY/Manifest' version: '6.012' - class: Dist::Zilla::Plugin::CheckVersionIncrement name: '@DROLSKY/CheckVersionIncrement' version: '0.121750' - class: Dist::Zilla::Plugin::TestRelease name: '@DROLSKY/TestRelease' version: '6.012' - class: Dist::Zilla::Plugin::ConfirmRelease name: '@DROLSKY/ConfirmRelease' version: '6.012' - class: Dist::Zilla::Plugin::UploadToCPAN name: '@DROLSKY/UploadToCPAN' version: '6.012' - class: Dist::Zilla::Plugin::VersionFromMainModule config: Dist::Zilla::Role::ModuleMetadata: Module::Metadata: '1.000033' version: '0.006' name: '@DROLSKY/VersionFromMainModule' version: '0.04' - class: Dist::Zilla::Plugin::Authority name: '@DROLSKY/Authority' version: '1.009' - class: Dist::Zilla::Plugin::AutoPrereqs name: '@DROLSKY/AutoPrereqs' version: '6.012' - class: Dist::Zilla::Plugin::CopyFilesFromBuild name: '@DROLSKY/CopyFilesFromBuild' version: '0.170880' - class: Dist::Zilla::Plugin::GitHub::Meta name: '@DROLSKY/GitHub::Meta' version: '0.47' - class: Dist::Zilla::Plugin::GitHub::Update config: Dist::Zilla::Plugin::GitHub::Update: metacpan: 1 name: '@DROLSKY/GitHub::Update' version: '0.47' - class: Dist::Zilla::Plugin::MetaResources name: '@DROLSKY/MetaResources' version: '6.012' - class: Dist::Zilla::Plugin::MetaProvides::Package config: Dist::Zilla::Plugin::MetaProvides::Package: finder_objects: - class: Dist::Zilla::Plugin::FinderCode name: '@DROLSKY/MetaProvides::Package/AUTOVIV/:InstallModulesPM' version: '6.012' include_underscores: 0 Dist::Zilla::Role::MetaProvider::Provider: $Dist::Zilla::Role::MetaProvider::Provider::VERSION: '2.002004' inherit_missing: '1' inherit_version: '1' meta_noindex: '1' Dist::Zilla::Role::ModuleMetadata: Module::Metadata: '1.000033' version: '0.006' name: '@DROLSKY/MetaProvides::Package' version: '2.004003' - class: Dist::Zilla::Plugin::Meta::Contributors name: '@DROLSKY/Meta::Contributors' version: '0.003' - class: Dist::Zilla::Plugin::MetaConfig name: '@DROLSKY/MetaConfig' version: '6.012' - class: Dist::Zilla::Plugin::MetaJSON name: '@DROLSKY/MetaJSON' version: '6.012' - class: Dist::Zilla::Plugin::MetaYAML name: '@DROLSKY/MetaYAML' version: '6.012' - class: Dist::Zilla::Plugin::NextRelease name: '@DROLSKY/NextRelease' version: '6.012' - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: test type: requires name: '@DROLSKY/Test::More with Test2' version: '6.012' - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: develop type: requires name: '@DROLSKY/Modules for use with tidyall' version: '6.012' - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: develop type: requires name: '@DROLSKY/Test::Version which fixes https://github.com/plicease/Test-Version/issues/7' version: '6.012' - class: Dist::Zilla::Plugin::PromptIfStale config: Dist::Zilla::Plugin::PromptIfStale: check_all_plugins: 0 check_all_prereqs: 0 modules: - Dist::Zilla::PluginBundle::DROLSKY phase: build run_under_travis: 0 skip: [] name: '@DROLSKY/Dist::Zilla::PluginBundle::DROLSKY' version: '0.055' - class: Dist::Zilla::Plugin::PromptIfStale config: Dist::Zilla::Plugin::PromptIfStale: check_all_plugins: 1 check_all_prereqs: 1 modules: [] phase: release run_under_travis: 0 skip: - Dist::Zilla::Plugin::DROLSKY::Contributors - Dist::Zilla::Plugin::DROLSKY::Git::CheckFor::CorrectBranch - Dist::Zilla::Plugin::DROLSKY::License - Dist::Zilla::Plugin::DROLSKY::TidyAll - Dist::Zilla::Plugin::DROLSKY::WeaverConfig - Pod::Weaver::PluginBundle::DROLSKY name: '@DROLSKY/PromptIfStale' version: '0.055' - class: Dist::Zilla::Plugin::Test::PodSpelling config: Dist::Zilla::Plugin::Test::PodSpelling: directories: - bin - lib spell_cmd: '' stopwords: - API - CLI - CaptureEvents - DROLSKY - "DROLSKY's" - EndCode - GitHub - Gruber - "Gruber's" - HTMLStream - MARKDENT - Markdent - "Markdent's" - Markdown - PayPal - PayPal - Rolsky - Rolsky - "Rolsky's" - SHAs - StartCode - StartEmphasis - StartLink - "XML's" - blockquote - blockquotes - colspan - doctype - drolsky - escapeable - esque - html - inline - lang - mdtest - namespace - parameterized - "parser's" - parsers - preformatted - unordered - uri - wiki wordlist: Pod::Wordlist name: '@DROLSKY/Test::PodSpelling' version: '2.007005' - class: Dist::Zilla::Plugin::PodSyntaxTests name: '@DROLSKY/PodSyntaxTests' version: '6.012' - class: Dist::Zilla::Plugin::DROLSKY::RunExtraTests config: Dist::Zilla::Role::TestRunner: default_jobs: 24 name: '@DROLSKY/DROLSKY::RunExtraTests' version: '1.01' - class: Dist::Zilla::Plugin::MojibakeTests name: '@DROLSKY/MojibakeTests' version: '0.8' - class: Dist::Zilla::Plugin::Test::CleanNamespaces config: Dist::Zilla::Plugin::Test::CleanNamespaces: filename: xt/author/clean-namespaces.t skips: - ^Markdent::(?:Regexes|Types(?:::Internal)?)$ name: '@DROLSKY/Test::CleanNamespaces' version: '0.006' - class: Dist::Zilla::Plugin::Test::CPAN::Changes config: Dist::Zilla::Plugin::Test::CPAN::Changes: changelog: Changes name: '@DROLSKY/Test::CPAN::Changes' version: '0.012' - class: Dist::Zilla::Plugin::Test::CPAN::Meta::JSON name: '@DROLSKY/Test::CPAN::Meta::JSON' version: '0.004' - class: Dist::Zilla::Plugin::Test::TidyAll name: '@DROLSKY/Test::TidyAll' version: '0.04' - class: Dist::Zilla::Plugin::Test::Compile config: Dist::Zilla::Plugin::Test::Compile: bail_out_on_fail: '0' fail_on_warning: author fake_home: 0 filename: xt/author/00-compile.t module_finder: - ':InstallModules' needs_display: 0 phase: develop script_finder: - ':PerlExecFiles' skips: [] switch: [] name: '@DROLSKY/Test::Compile' version: '2.058' - class: Dist::Zilla::Plugin::Test::ReportPrereqs name: '@DROLSKY/Test::ReportPrereqs' version: '0.027' - class: Dist::Zilla::Plugin::Test::Version name: '@DROLSKY/Test::Version' version: '1.09' - class: Dist::Zilla::Plugin::DROLSKY::Contributors name: '@DROLSKY/DROLSKY::Contributors' version: '1.01' - class: Dist::Zilla::Plugin::Git::Contributors config: Dist::Zilla::Plugin::Git::Contributors: git_version: 2.20.1 include_authors: 0 include_releaser: 1 order_by: name paths: [] name: '@DROLSKY/Git::Contributors' version: '0.035' - class: Dist::Zilla::Plugin::SurgicalPodWeaver config: Dist::Zilla::Plugin::PodWeaver: config_plugins: - '@DROLSKY' finder: - ':InstallModules' - ':ExecFiles' plugins: - class: Pod::Weaver::Plugin::EnsurePod5 name: '@CorePrep/EnsurePod5' version: '4.015' - class: Pod::Weaver::Plugin::H1Nester name: '@CorePrep/H1Nester' version: '4.015' - class: Pod::Weaver::Plugin::SingleEncoding name: '@DROLSKY/SingleEncoding' version: '4.015' - class: Pod::Weaver::Plugin::Transformer name: '@DROLSKY/List' version: '4.015' - class: Pod::Weaver::Plugin::Transformer name: '@DROLSKY/Verbatim' version: '4.015' - class: Pod::Weaver::Section::Region name: '@DROLSKY/header' version: '4.015' - class: Pod::Weaver::Section::Name name: '@DROLSKY/Name' version: '4.015' - class: Pod::Weaver::Section::Version name: '@DROLSKY/Version' version: '4.015' - class: Pod::Weaver::Section::Region name: '@DROLSKY/prelude' version: '4.015' - class: Pod::Weaver::Section::Generic name: SYNOPSIS version: '4.015' - class: Pod::Weaver::Section::Generic name: DESCRIPTION version: '4.015' - class: Pod::Weaver::Section::Generic name: OVERVIEW version: '4.015' - class: Pod::Weaver::Section::Collect name: ATTRIBUTES version: '4.015' - class: Pod::Weaver::Section::Collect name: METHODS version: '4.015' - class: Pod::Weaver::Section::Collect name: FUNCTIONS version: '4.015' - class: Pod::Weaver::Section::Collect name: TYPES version: '4.015' - class: Pod::Weaver::Section::Leftovers name: '@DROLSKY/Leftovers' version: '4.015' - class: Pod::Weaver::Section::Region name: '@DROLSKY/postlude' version: '4.015' - class: Pod::Weaver::Section::GenerateSection name: '@DROLSKY/generate SUPPORT' version: '1.06' - class: Pod::Weaver::Section::AllowOverride name: '@DROLSKY/allow override SUPPORT' version: '0.05' - class: Pod::Weaver::Section::GenerateSection name: '@DROLSKY/generate SOURCE' version: '1.06' - class: Pod::Weaver::Section::GenerateSection name: '@DROLSKY/generate DONATIONS' version: '1.06' - class: Pod::Weaver::Section::Authors name: '@DROLSKY/Authors' version: '4.015' - class: Pod::Weaver::Section::Contributors name: '@DROLSKY/Contributors' version: '0.009' - class: Pod::Weaver::Section::Legal name: '@DROLSKY/Legal' version: '4.015' - class: Pod::Weaver::Section::Region name: '@DROLSKY/footer' version: '4.015' name: '@DROLSKY/SurgicalPodWeaver' version: '0.0023' - class: Dist::Zilla::Plugin::DROLSKY::WeaverConfig name: '@DROLSKY/DROLSKY::WeaverConfig' version: '1.01' - class: Dist::Zilla::Plugin::ReadmeAnyFromPod config: Dist::Zilla::Role::FileWatcher: version: '0.006' name: '@DROLSKY/README.md in build' version: '0.163250' - class: Dist::Zilla::Plugin::GenerateFile::FromShareDir config: Dist::Zilla::Plugin::GenerateFile::FromShareDir: destination_filename: CONTRIBUTING.md dist: Dist-Zilla-PluginBundle-DROLSKY encoding: UTF-8 has_xs: '0' location: build source_filename: CONTRIBUTING.md Dist::Zilla::Role::RepoFileInjector: allow_overwrite: 1 repo_root: . version: '0.009' name: '@DROLSKY/Generate CONTRIBUTING.md' version: '0.014' - class: Dist::Zilla::Plugin::GenerateFile::FromShareDir config: Dist::Zilla::Plugin::GenerateFile::FromShareDir: destination_filename: CODE_OF_CONDUCT.md dist: Dist-Zilla-PluginBundle-DROLSKY encoding: UTF-8 has_xs: '0' location: build source_filename: CODE_OF_CONDUCT.md Dist::Zilla::Role::RepoFileInjector: allow_overwrite: 1 repo_root: . version: '0.009' name: '@DROLSKY/Generate CODE_OF_CONDUCT.md' version: '0.014' - class: Dist::Zilla::Plugin::InstallGuide name: '@DROLSKY/InstallGuide' version: '1.200012' - class: Dist::Zilla::Plugin::CPANFile name: '@DROLSKY/CPANFile' version: '6.012' - class: Dist::Zilla::Plugin::DROLSKY::License name: '@DROLSKY/DROLSKY::License' version: '1.01' - class: Dist::Zilla::Plugin::CheckStrictVersion name: '@DROLSKY/CheckStrictVersion' version: '0.001' - class: Dist::Zilla::Plugin::CheckSelfDependency config: Dist::Zilla::Plugin::CheckSelfDependency: finder: - ':InstallModules' Dist::Zilla::Role::ModuleMetadata: Module::Metadata: '1.000033' version: '0.006' name: '@DROLSKY/CheckSelfDependency' version: '0.011' - class: Dist::Zilla::Plugin::CheckPrereqsIndexed name: '@DROLSKY/CheckPrereqsIndexed' version: '0.020' - class: Dist::Zilla::Plugin::DROLSKY::Git::CheckFor::CorrectBranch config: Dist::Zilla::Role::Git::Repo: git_version: 2.20.1 repo_root: . name: '@DROLSKY/DROLSKY::Git::CheckFor::CorrectBranch' version: '1.01' - class: Dist::Zilla::Plugin::EnsureChangesHasContent name: '@DROLSKY/EnsureChangesHasContent' version: '0.02' - class: Dist::Zilla::Plugin::DROLSKY::TidyAll name: '@DROLSKY/DROLSKY::TidyAll' version: '1.01' - class: Dist::Zilla::Plugin::Git::Check config: Dist::Zilla::Plugin::Git::Check: untracked_files: die Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: - CODE_OF_CONDUCT.md - CONTRIBUTING.md - Changes - LICENSE - Makefile.PL - README.md - cpanfile - tidyall.ini allow_dirty_match: [] changelog: Changes Dist::Zilla::Role::Git::Repo: git_version: 2.20.1 repo_root: . name: '@DROLSKY/Git::Check' version: '2.045' - class: Dist::Zilla::Plugin::Git::Commit config: Dist::Zilla::Plugin::Git::Commit: add_files_in: [] commit_msg: v%v%n%n%c Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: - CODE_OF_CONDUCT.md - CONTRIBUTING.md - Changes - LICENSE - Makefile.PL - README.md - cpanfile - tidyall.ini allow_dirty_match: [] changelog: Changes Dist::Zilla::Role::Git::Repo: git_version: 2.20.1 repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: '@DROLSKY/Commit generated files' version: '2.045' - class: Dist::Zilla::Plugin::Git::Tag config: Dist::Zilla::Plugin::Git::Tag: branch: ~ changelog: Changes signed: 0 tag: v0.33 tag_format: v%v tag_message: v%v Dist::Zilla::Role::Git::Repo: git_version: 2.20.1 repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: '@DROLSKY/Git::Tag' version: '2.045' - class: Dist::Zilla::Plugin::Git::Push config: Dist::Zilla::Plugin::Git::Push: push_to: - origin remotes_must_exist: 1 Dist::Zilla::Role::Git::Repo: git_version: 2.20.1 repo_root: . name: '@DROLSKY/Git::Push' version: '2.045' - class: Dist::Zilla::Plugin::BumpVersionAfterRelease config: Dist::Zilla::Plugin::BumpVersionAfterRelease: finders: - ':ExecFiles' - ':InstallModules' global: 0 munge_makefile_pl: 1 name: '@DROLSKY/BumpVersionAfterRelease' version: '0.018' - class: Dist::Zilla::Plugin::Git::Commit config: Dist::Zilla::Plugin::Git::Commit: add_files_in: [] commit_msg: 'Bump version after release' Dist::Zilla::Role::Git::DirtyFiles: allow_dirty: - Changes - dist.ini allow_dirty_match: - (?^:.+) changelog: Changes Dist::Zilla::Role::Git::Repo: git_version: 2.20.1 repo_root: . Dist::Zilla::Role::Git::StringFormatter: time_zone: local name: '@DROLSKY/Commit version bump' version: '2.045' - class: Dist::Zilla::Plugin::Git::Push config: Dist::Zilla::Plugin::Git::Push: push_to: - origin remotes_must_exist: 1 Dist::Zilla::Role::Git::Repo: git_version: 2.20.1 repo_root: . name: '@DROLSKY/Push version bump' version: '2.045' - class: Dist::Zilla::Plugin::DROLSKY::MakeMaker config: Dist::Zilla::Plugin::MakeMaker: make_path: make version: '6.012' Dist::Zilla::Plugin::MakeMaker::Awesome: version: '0.42' Dist::Zilla::Role::TestRunner: default_jobs: 24 version: '6.012' name: '@DROLSKY/DROLSKY::MakeMaker' version: '1.01' - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: develop type: requires name: DevelopRequires version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':InstallModules' version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':IncModules' version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':TestFiles' version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':ExtraTestFiles' version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':ExecFiles' version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':PerlExecFiles' version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':ShareFiles' version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':MainModule' version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':AllFiles' version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':NoFiles' version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: '@DROLSKY/MetaProvides::Package/AUTOVIV/:InstallModulesPM' version: '6.012' zilla: class: Dist::Zilla::Dist::Builder config: is_trial: '0' version: '6.012' x_authority: cpan:DROLSKY x_contributors: - 'Andrew Speer ' - 'Denis Ibaev ' - 'Jason McIntosh ' - 'Polina Shubina <925043@mai.com>' - 'Shlomi Fish ' - 'Tom Hukins ' x_generated_by_perl: v5.26.2 x_serialization_backend: 'YAML::Tiny version 1.73' Markdent-0.33/Changes0000644000175000017500000002503213420436470014344 0ustar autarchautarch0.33 2019-01-18 - Replace use of Digest::SHA1 with Digest::SHA. The latter is core since 5.9.3 so it's one less dependency. Requested by Jonas Smedegaard. GH #17. 0.32 2018-10-20 - Added more documentation to Markdent.pm containing pointers to various classes in the distribution. Also added POD documentation to the markdent-html script that ships with this distro. 0.31 2018-06-09 - Moved from rt.cpan.org to GitHub issues. 0.30 2018-02-18 - Require Perl 5.10. Perl 5.8.x has very weird parsing failures on valid Perl code in this distribution. - Specify required versions of Params::ValidationCompiler and Test2::V0. This module does not work with just any versions of those two. Fixed by Denis Ibaev. GitHub #11. 0.29 2017-12-31 - Make the GitHub dialect look for fenced code blocks before other types of markup. Otherwise this could parse the _inside_ of a fenced code block as containing some sort of block-level markup like a two-line list. Reported by Frew Schmidt. GitHub #10. 0.28 2017-11-21 - Require Moose 2.1802 for full compatibility with Specio. 0.27 2017-11-09 - Replaced MooseX::Params::Validate and MooseX::Types with Params::ValidationCompiler and Specio. There are also some other internals changes to improve performance in this release. Prompted by fREW Schmidt. GitHub #9. 0.26 2015-05-31 - Fixes for Unicode characters when generating HTML. The Markdent::Simple::* classes now make sure that the scalar it returns containing HTML contains characters, not bytes. The Markdent::Handler::HTMLStream::* classes no longer entitize non-ASCII characters. Only control characters and HTML reserved characters (< > & ") are encoded as HTML entities. The problems with Unicode handling were reported by Polina Shubha. GitHub PR #8. - HTML blocks containing Unicode characters could cause the parser to die or warn. Reported by Polina Shubha. GitHub PR #8. - A change in 0.25 broke the ability to have a dialect with just a block parser or span parser rather than both. Reported by Polina Shubina. GitHub issue #7. - The parsing of HTML entities was too greedy, so that something like "<word>" would be parsed a single entity, "lt;word>", which is clearly wrong. Fixed by Polina Shubina. GitHub PR #3. - Accept Pandoc (1.12.3)-generated GitHub-format Markdown document style for fenced code blocks - "``` {.Perl}". Implemented by Andrew Speer. GitHub PR #4. 0.25 2015-01-04 - HTML output now uses the HTML5 doctype. In addition, table cell alignment is set using a style tag in generated HTML, rather than the deprecated-in-HTML5 "align" attribute. - The Markdent::Handler::HTMLStream::Document and Markdent::Simple::Document classes now accept optional charset and language parameters. - The HTML output for table cells was broken. Cells always ended with even for body cells. Reported by Polina Shubina. GitHub PR #2. - Replaced Class::Load with Module::Runtime. 0.24 2014-01-25 - Shut up enum warnings from the latest Moose (2.1200). Patch by Zoffix. RT #92274. 0.23 2013-12-13 - Added support for drunken (42, 5, 3) and lazy (1, 1, 1) ordered lists, per the Markdown spec - http://daringfireball.net/projects/markdown/syntax#list. Based on tests and patch from Jason McIntosh. 0.22 2012-07-22 * All dialects except the Standard dialect are now roles. This makes it possible to create a parser that parses multiple dialects. It's possible for dialects to have conflicting parsing rules, in which case the results are unpredictable. This is a backwards incompatible change, but should not break most code, unless you have implemented your own dialect, or you were explicitly setting a block or span parser class to something like block_parser_class => 'Markdent::Dialect::Theory::BlockParser' But there was really no good reason to do this. - The Standard dialect block/span parser classes are now named Markdent::Parser::BlockParser and ::SpanParser. - The use of a "dialect" as a named parameter has been replaced by "dialects". The "dialects" parameter can be either a string or an array ref of strings. However, the "dialect" parameter is still accepted for backwards compatibility. This may be removed in the future. - The Standard dialect now parses two spaces at the end of a line as a line break. There is a new Markdent::Event::LineBreak class to go with this. - Improve the bin/markdent-html script. It now has a --help option. You can pass it Markdown text via the CLI --text option, rather than only via a --file. - Implemented most of GitHub-flavored Markdown as a dialect. 0.21 2012-06-22 - The StartListItem event now has a bullet attribute. This contains the text of the bullet, something like "*" or "1.". Requested by Steven Haryanto. RT #77893. 0.20 2012-05-18 - Work around breakage introduced with MooseX::Types 0.32. 0.19 2012-03-04 - Some modules were missing a version number in the last release. 0.18 2012-03-04 - The Markdent::Handler::HTMLStream::Document and ::Fragment modules did not detect when streaming to a file handle failed. This is because HTML::Stream does not check that it's calls to ->print succeed. This has been fixed by wrapping file handles (native or IO::Handle) in an object which checks that print succeeds. - Distro/packaging cleanup. 0.17 2010-09-27 - Avoid warnings from the next Moose. - Added a Null handler. 0.16 2010-06-03 - The last release (and others?) did not include a $VERSION in its modules. Doh. 0.15 2010-06-03 - Even more table parsing improvements. Now the parse speed is approximately 50 times faster than 0.13. 0.14 2010-06-03 - Greatly improved table parsing speed. Large tables took a very long time to parse, as the parser ended up backtracking way too much. Thanks to Yuval Kogman for his suggestions. Now large tables parse approximately 10 times faster. 0.13 2010-06-01 - Fixed handling of a very pathological case for table parsing, which caused the parser to die. Instead, it will now keep going. Your output may be bizarre, but the parser should not die. - Fixed handling of a tab character next to a cell delimiter. This caused the parser to become very confused and go into an endless loop. Now such tabs are simply stripped from the output (just like other whitespace next to a cell delimiter). 0.12 2010-05-25 - Allow setting the handler class when calling Test::Markdent::parse_ok(). 0.11 2010-05-25 - Moved Test::Markdent into lib (from t/lib), since it is useful to anyone who wants to write a Markdent dialect. 0.10 2010-05-19 - Split all HTML generating code into ::Document and ::Fragment classes. This means that Markdent::Handler::HTMLStream is now Markdent::Handler::HTMLStream::Document and Markdent::Handler::HTMLStream::Fragment. Similarly, Markdent::Simple is now Markdent::Simple::Document and Markdent::Simple::Fragment. This was done to make it easy to turn a snippet of Markdown into a snippet of HTML. Previously, you could only generate a complete HTML document. 0.09 2010-02-15 - The Theory dialect parser would parse text in brackets as a table caption even if no table followed, for example: [Not a caption] Just some text 0.08 2009-12-06 - Added a missing dependency, MooseX::Role::Parameterized. 0.07 2009-11-27 - You can now include a header marker at the beginning and/or end of the table. This matches how MySQL outputs tables from its CLI tool. +------+-------------+------------------------------+--------+ | id | name | description | price | +------+-------------+------------------------------+--------+ | 1 | gizmo | Takes care of the doohickies | 1.99 | | 2 | doodad | Collects *gizmos* | 23.80 | | 10 | dojigger | Foo | 102.98 | | 1024 | thingamabob | Self-explanatory, no? | 0.99 | +------+-------------+------------------------------+--------+ Suggested by David Wheeler. 0.06 2009-11-27 - Added a new handler, Markdent::Handler::HTMLFilter, which removes all HTML events (except for entities) from the event stream. - Added a new role, Markdent::Role::FilterHandler, to make it easier to write filtering handlers. 0.05 2009-11-27 - Theory-style tables no longer need to have header rows. They can just consist of a body. - Theory-style header rows can use equals signs (=) in the marker: | Header 1 | Header 2 | +==========+==========+ | Body 1 | Body 2 | 0.04 2009-11-26 - Added Markdent::Manual, a start at more comprehensive high-level docs on how to use Markdent. - Fixed some parsing bugs where some match methods did not return true, which could cause failures if the handler's handle_event method didn't return true. Now all match methods explicitly return true when they match (as they should). - Added a new handler, Multiplexer, which lets you multiplex the event stream to more than one handler at a time. 0.03 2009-11-26 - Added Markdent::Handler::CaptureEvents and Markdent::CapturedEvents. In my benchmarks, thawing a Markdent::CaptureEvents object and replaying its events to generate HTML for a bunch of documents was about 6x faster than parsing from scratch. - Started implementing some Markdown extensions proposed by David Wheeler as the "Theory" dialect. This includes a nice syntax for tables. For now this only includes the table extension. - Made it easy to specify a dialect for a parser by writing my $parser = Markdent::Parser->new( dialect => 'Theory' ); - HTML comments are now parsed as comments, not text or HTML tags. There are two events for this, HTMLCommentBlock and HTMLComment. The block version is for standalone comments, the other is for comments embedded in text. - Made tag balancing a bit more generic with the Markdent::Role::BalancedEvent role, which makes it easier to compare start & end events to see if they're balanced. - Refactored some parser internals to improve subclassability. 0.02 2009-11-24 - Fixed some cases of nested strong and em in the Standard dialect's parser. It was broken for cases like this: *This **is a test***. This should turn into HTML like This is a test but instead turned into This is a test*. - Added some missing test dependencies. - There is now a separate class for each type of event, all of which do the Markdent::Role::Event role. 0.01 2009-11-21 - First version, released on an unsuspecting world. Still rather alpha, and internals are subject to lots of change. Markdent-0.33/CONTRIBUTING.md0000644000175000017500000000760013420436470015303 0ustar autarchautarch# CONTRIBUTING Thank you for considering contributing to this distribution. This file contains instructions that will help you work with the source code. Please note that if you have any questions or difficulties, you can reach the maintainer(s) through the bug queue described later in this document (preferred), or by emailing the releaser directly. You are not required to follow any of the steps in this document to submit a patch or bug report; these are just recommendations, intended to help you (and help us help you faster). The distribution is managed with [Dist::Zilla](https://metacpan.org/release/Dist-Zilla). However, you can still compile and test the code with the `MakeFile.PL` in the repository: perl Makefile.PL make make test You may need to satisfy some dependencies. The easiest way to satisfy dependencies is to install the last release. This is available at https://metacpan.org/release/Markdent You can use [`cpanminus`](https://metacpan.org/pod/App::cpanminus) to do this without downloading the tarball first: $ cpanm --reinstall --installdeps --with-recommends Markdent [`Dist::Zilla`](https://metacpan.org/pod/Dist::Zilla) is a very powerful authoring tool, but requires a number of author-specific plugins. If you would like to use it for contributing, install it from CPAN, then the following command to install the needed distros: $ dzil authordeps --missing | cpanm There may also be additional requirements not needed by the dzil build which are needed for tests or other development: $ dzil listdeps --author --missing | cpanm Or, you can use the 'dzil stale' command to install all requirements at once: $ cpanm Dist::Zilla::App::Command::stale $ dzil stale --all | cpanm You can also do this via cpanm directly: $ cpanm --reinstall --installdeps --with-develop --with-recommends Markdent Once installed, here are some dzil commands you might try: $ dzil build $ dzil test $ dzil test --release $ dzil xtest $ dzil listdeps --json $ dzil build --notgz You can learn more about Dist::Zilla at http://dzil.org/. The code for this distribution is [hosted on GitHub](https://github.com/houseabsolute/Markdent). You can submit code changes by forking the repository, pushing your code changes to your clone, and then submitting a pull request. See the GitHub documentation for [detailed instructions on pull requests](https://help.github.com/articles/creating-a-pull-request) If you have found a bug, but do not have an accompanying patch to fix it, you can submit an issue report [via the web](https://github.com/houseabsolute/Markdent/issues). ## Continuous Integration All pull requests for this distribution will be automatically tested on Linux by [Travis](https://travis-ci.org/houseabsolute/Markdent) and on Windows by [AppVeyor](https://ci.appveyor.com/project/autarch/Markdent). All CI results will be visible in the pull request on GitHub. Follow the appropriate links for details when tests fail. ## TidyAll This distribution uses [Code::TidyAll](https://metacpan.org/release/Code-TidyAll) to enforce a uniform coding style. This is tested as part of the author testing suite. You can install and run tidyall by running the following commands: $ cpanm Code::TidyAll $ tidyall -a Please run this before committing your changes and address any issues it brings up. ## Contributor Names If you send a patch or pull request, your name and email address will be included in the documentation as a contributor (using the attribution on the commit or patch), unless you specifically request for it not to be. If you wish to be listed under a different name or address, you should submit a pull request to the `.mailmap` file to contain the correct mapping. ## Generated By This file was generated via Dist::Zilla::Plugin::GenerateFile::FromShareDir 0.014 from a template file originating in Dist-Zilla-PluginBundle-DROLSKY-1.01. Markdent-0.33/LICENSE0000644000175000017500000004365213420436470014066 0ustar autarchautarchThis software is copyright (c) 2019 by Dave Rolsky. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Terms of the Perl programming language system itself a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or b) the "Artistic License" --- The GNU General Public License, Version 1, February 1989 --- This software is Copyright (c) 2019 by Dave Rolsky. This is free software, licensed under: The GNU General Public License, Version 1, February 1989 GNU GENERAL PUBLIC LICENSE Version 1, February 1989 Copyright (C) 1989 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The license agreements of most software companies try to keep users at the mercy of those companies. By contrast, our General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. The General Public License applies to the Free Software Foundation's software and to any other program whose authors commit to using it. You can use it for your programs, too. When we speak of free software, we are referring to freedom, not price. Specifically, the General Public License is designed to make sure that you have the freedom to give away or sell copies of free software, that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of a such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must tell them their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any work containing the Program or a portion of it, either verbatim or with modifications. Each licensee is addressed as "you". 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this General Public License and to the absence of any warranty; and give any other recipients of the Program a copy of this General Public License along with the Program. You may charge a fee for the physical act of transferring a copy. 2. You may modify your copy or copies of the Program or any portion of it, and copy and distribute such modifications under the terms of Paragraph 1 above, provided that you also do the following: a) cause the modified files to carry prominent notices stating that you changed the files and the date of any change; and b) cause the whole of any work that you distribute or publish, that in whole or in part contains the Program or any part thereof, either with or without modifications, to be licensed at no charge to all third parties under the terms of this General Public License (except that you may choose to grant warranty protection to some or all third parties, at your option). c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the simplest and most usual way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this General Public License. d) You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. Mere aggregation of another independent work with the Program (or its derivative) on a volume of a storage or distribution medium does not bring the other work under the scope of these terms. 3. You may copy and distribute the Program (or a portion or derivative of it, under Paragraph 2) in object code or executable form under the terms of Paragraphs 1 and 2 above provided that you also do one of the following: a) accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Paragraphs 1 and 2 above; or, b) accompany it with a written offer, valid for at least three years, to give any third party free (except for a nominal charge for the cost of distribution) a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Paragraphs 1 and 2 above; or, c) accompany it with the information you received as to where the corresponding source code may be obtained. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form alone.) Source code for a work means the preferred form of the work for making modifications to it. For an executable file, complete source code means all the source code for all modules it contains; but, as a special exception, it need not include source code for modules which are standard libraries that accompany the operating system on which the executable file runs, or for standard header files or definitions files that accompany that operating system. 4. You may not copy, modify, sublicense, distribute or transfer the Program except as expressly provided under this General Public License. Any attempt otherwise to copy, modify, sublicense, distribute or transfer the Program is void, and will automatically terminate your rights to use the Program under this License. However, parties who have received copies, or rights to use copies, from you under this General Public License will not have their licenses terminated so long as such parties remain in full compliance. 5. By copying, distributing or modifying the Program (or any work based on the Program) you indicate your acceptance of this license to do so, and all its terms and conditions. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. 7. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of the license which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the license, you may choose any version ever published by the Free Software Foundation. 8. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to humanity, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19xx name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (a program to direct compilers to make passes at assemblers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice That's all there is to it! --- The Artistic License 1.0 --- This software is Copyright (c) 2019 by Dave Rolsky. This is free software, licensed under: The Artistic License 1.0 The Artistic License Preamble The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: - "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. - "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder. - "Copyright Holder" is whoever is named in the copyright or copyrights for the package. - "You" is you, if you're thinking about copying or distributing this Package. - "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) - "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. 3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as ftp.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. b) use the modified Package only within your corporation or organization. c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. d) make other distribution arrangements with the Copyright Holder. 4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. b) accompany the distribution with the machine-readable source of the Package with your modifications. c) accompany any non-standard executables with their corresponding Standard Version executables, giving the non-standard executables non-standard names, and clearly documenting the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. d) make other distribution arrangements with the Copyright Holder. 5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. 6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this Package. 7. C or perl subroutines supplied by you and linked into this Package shall not be considered part of this Package. 8. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End Markdent-0.33/README.md0000644000175000017500000001557113420436470014337 0ustar autarchautarch# NAME Markdent - An event-based Markdown parser toolkit # VERSION version 0.33 # SYNOPSIS use Markdent::Simple::Document; my $parser = Markdent::Simple::Document->new(); my $html = $parser->markdown_to_html( title => 'My Document', markdown => $markdown, ); # DESCRIPTION This distribution provides a toolkit for parsing Markdown (and Markdown variants, aka dialects). Unlike the other Markdown Perl tools, this module can be used for more than just generating HTML. The core parser generates events (like XML's SAX), making it easy to analyze a Markdown document in any number of ways. If you're only interested in converting Markdown to HTML, you can use the [Markdent::Simple::Document](https://metacpan.org/pod/Markdent::Simple::Document) class to do this, although you can just as well use better battle-tested tools like [Text::Markdown](https://metacpan.org/pod/Text::Markdown). See [Markdent::Manual](https://metacpan.org/pod/Markdent::Manual) for more details on how Markdent works and how you can use it. # QUICK MARKDOWN TO HTML CONVERSION If you just want to do some quick Markdown to HTML conversion use either the [Markdent::Simple::Document](https://metacpan.org/pod/Markdent::Simple::Document) or [Markdent::Simple::Fragment](https://metacpan.org/pod/Markdent::Simple::Fragment) class. This distribution also ships with a command line tool called [markdent-html](https://metacpan.org/pod/markdent-html). See that tool's documentation for details on how to use it. # PROCESSING PIPELINES If you want to create a Markdown processing pipeline, start by looking at the various handler classes: - [Markdent::Handler::HTMLStream::Document](https://metacpan.org/pod/Markdent::Handler::HTMLStream::Document) - [Markdent::Handler::HTMLStream::Fragment](https://metacpan.org/pod/Markdent::Handler::HTMLStream::Fragment) - [Markdent::Handler::HTMLStream::Multiplexer](https://metacpan.org/pod/Markdent::Handler::HTMLStream::Multiplexer) - [Markdent::Handler::HTMLStream::HTMLFilter](https://metacpan.org/pod/Markdent::Handler::HTMLStream::HTMLFilter) - [Markdent::Handler::HTMLStream::CaptureEvents](https://metacpan.org/pod/Markdent::Handler::HTMLStream::CaptureEvents) You will probably also want to write your own handler class as part of the pipeline. This will need to implement the [Markdent::Role::Handler](https://metacpan.org/pod/Markdent::Role::Handler) role. To do that you'll need to review the many `Markdent::Event::*` classes. Each event represents something seen by the parse, such as a piece of the start or end of a piece of block (paragraph, header) or span markup (strong, link) or some text. The start of a pipeline will generally be either the [Markdent::Parser](https://metacpan.org/pod/Markdent::Parser) or [Markdent::CapturedEvents](https://metacpan.org/pod/Markdent::CapturedEvents) class. # CUSTOM DIALECTS You may also want to implement a custom dialect to add some additional features to the parser. Your parser classes will need to consume either the [Markdent::Role::Dialect::BlockParser](https://metacpan.org/pod/Markdent::Role::Dialect::BlockParser) or the [Markdent::Role::Dialect::SpanParser](https://metacpan.org/pod/Markdent::Role::Dialect::SpanParser) role. The best way to understand how a dialect is implemented is to look at one of the existing dialect classes: - [Markdent::Dialect::GitHub::BlockParser](https://metacpan.org/pod/Markdent::Dialect::GitHub::BlockParser) - [Markdent::Dialect::GitHub::SpanParser](https://metacpan.org/pod/Markdent::Dialect::GitHub::SpanParser) - [Markdent::Dialect::Theory::BlockParser](https://metacpan.org/pod/Markdent::Dialect::Theory::BlockParser) - [Markdent::Dialect::Theory::SpanParser](https://metacpan.org/pod/Markdent::Dialect::Theory::SpanParser) You'll also need to dig into the core [Markdent::Parser::BlockParser](https://metacpan.org/pod/Markdent::Parser::BlockParser) and [Markdent::Parser::SpanParser](https://metacpan.org/pod/Markdent::Parser::SpanParser) classes in order to see h ow these dialects interact with the core parser. # DONATIONS If you'd like to thank me for the work I've done on this module, please consider making a "donation" to me via PayPal. I spend a lot of free time creating free software, and would appreciate any support you'd care to offer. Please note that **I am not suggesting that you must do this** in order for me to continue working on this particular software. I will continue to do so, inasmuch as I have in the past, for as long as it interests me. Similarly, a donation made in this way will probably not make me work on this software much more, unless I get so many donations that I can consider working on free software full time, which seems unlikely at best. To donate, log into PayPal and send money to autarch@urth.org or use the button on this page: [http://www.urth.org/~autarch/fs-donation.html](http://www.urth.org/~autarch/fs-donation.html) # BUGS Please report any bugs or feature requests to `bug-markdent@rt.cpan.org`, or through the web interface at [http://rt.cpan.org](http://rt.cpan.org). I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. Bugs may be submitted at [https://github.com/houseabsolute/Markdent/issues](https://github.com/houseabsolute/Markdent/issues). I am also usually active on IRC as 'autarch' on `irc://irc.perl.org`. # SOURCE The source code repository for Markdent can be found at [https://github.com/houseabsolute/Markdent](https://github.com/houseabsolute/Markdent). # DONATIONS If you'd like to thank me for the work I've done on this module, please consider making a "donation" to me via PayPal. I spend a lot of free time creating free software, and would appreciate any support you'd care to offer. Please note that **I am not suggesting that you must do this** in order for me to continue working on this particular software. I will continue to do so, inasmuch as I have in the past, for as long as it interests me. Similarly, a donation made in this way will probably not make me work on this software much more, unless I get so many donations that I can consider working on free software full time (let's all have a chuckle at that together). To donate, log into PayPal and send money to autarch@urth.org, or use the button at [http://www.urth.org/~autarch/fs-donation.html](http://www.urth.org/~autarch/fs-donation.html). # AUTHOR Dave Rolsky # CONTRIBUTORS - Andrew Speer - Denis Ibaev - Jason McIntosh - Polina Shubina <925043@mai.com> - Shlomi Fish - Tom Hukins # COPYRIGHT AND LICENSE This software is copyright (c) 2019 by Dave Rolsky. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. The full text of the license can be found in the `LICENSE` file included with this distribution. Markdent-0.33/perltidyrc0000644000175000017500000000045513420436470015157 0ustar autarchautarch-l=78 -i=4 -ci=4 -se -b -bar -boc -vt=0 -vtc=0 -cti=0 -pt=1 -bt=1 -sbt=1 -bbt=1 -nolq -npro -nsfs --blank-lines-before-packages=0 --opening-hash-brace-right --no-outdent-long-comments --iterations=2 -wbb="% + - * / x != == >= <= =~ !~ < > | & >= < = **= += *= &= <<= &&= -= /= |= >>= ||= .= %= ^= x=" Markdent-0.33/META.json0000644000175000017500000013527413420436470014504 0ustar autarchautarch{ "abstract" : "An event-based Markdown parser toolkit", "author" : [ "Dave Rolsky " ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 6.012, CPAN::Meta::Converter version 2.150010", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : 2 }, "name" : "Markdent", "prereqs" : { "configure" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "develop" : { "requires" : { "Code::TidyAll" : "0.56", "Code::TidyAll::Plugin::SortLines::Naturally" : "0.000003", "Code::TidyAll::Plugin::Test::Vars" : "0.02", "File::Spec" : "0", "HTML::Differences" : "0", "IO::Handle" : "0", "IPC::Open3" : "0", "Parallel::ForkManager" : "1.19", "Perl::Critic" : "1.126", "Perl::Tidy" : "20160302", "Pod::Coverage::Moose" : "0.02", "Pod::Wordlist" : "0", "Test2::V0" : "0", "Test::CPAN::Changes" : "0.19", "Test::CPAN::Meta::JSON" : "0.16", "Test::CleanNamespaces" : "0.15", "Test::Code::TidyAll" : "0.50", "Test::Mojibake" : "0", "Test::More" : "0.96", "Test::Pod" : "1.41", "Test::Pod::Coverage" : "1.04", "Test::Spelling" : "0.12", "Test::Vars" : "0.009", "Test::Version" : "2.05" } }, "runtime" : { "requires" : { "Digest::SHA" : "0", "Encode" : "0", "Exporter" : "0", "File::Slurper" : "0", "Getopt::Long::Descriptive" : "0", "HTML::Entities" : "0", "IO::Handle" : "0", "List::AllUtils" : "0", "Module::Runtime" : "0", "Moose" : "2.1802", "Moose::Meta::Class" : "0", "Moose::Role" : "0", "MooseX::Getopt::Dashes" : "0", "MooseX::Getopt::OptionTypeMap" : "0", "MooseX::Role::Parameterized" : "0", "MooseX::SemiAffordanceAccessor" : "0.05", "MooseX::StrictConstructor" : "0.08", "Params::ValidationCompiler" : "0.14", "Scalar::Util" : "0", "Specio::Declare" : "0", "Specio::Exporter" : "0", "Specio::Library::Builtins" : "0", "Specio::Library::Numeric" : "0", "Tree::Simple" : "0", "Try::Tiny" : "0", "base" : "0", "namespace::autoclean" : "0.09", "parent" : "0", "perl" : "5.010", "re" : "0", "strict" : "0", "warnings" : "0" } }, "test" : { "recommends" : { "CPAN::Meta" : "2.120900" }, "requires" : { "Data::Dumper" : "0", "ExtUtils::MakeMaker" : "0", "File::Basename" : "0", "File::Find" : "0", "File::Spec" : "0", "File::Temp" : "0", "IO::File" : "0", "Test2::V0" : "0.000081", "Test::More" : "1.302015", "Test::Requires" : "0", "Tree::Simple::Visitor::ToNestedArray" : "0", "lib" : "0", "utf8" : "0" } } }, "provides" : { "Markdent" : { "file" : "lib/Markdent.pm", "version" : "0.33" }, "Markdent::CLI" : { "file" : "lib/Markdent/CLI.pm", "version" : "0.33" }, "Markdent::CapturedEvents" : { "file" : "lib/Markdent/CapturedEvents.pm", "version" : "0.33" }, "Markdent::CheckedOutput" : { "file" : "lib/Markdent/CheckedOutput.pm", "version" : "0.33" }, "Markdent::Dialect::GitHub::BlockParser" : { "file" : "lib/Markdent/Dialect/GitHub/BlockParser.pm", "version" : "0.33" }, "Markdent::Dialect::GitHub::SpanParser" : { "file" : "lib/Markdent/Dialect/GitHub/SpanParser.pm", "version" : "0.33" }, "Markdent::Dialect::Theory::BlockParser" : { "file" : "lib/Markdent/Dialect/Theory/BlockParser.pm", "version" : "0.33" }, "Markdent::Dialect::Theory::SpanParser" : { "file" : "lib/Markdent/Dialect/Theory/SpanParser.pm", "version" : "0.33" }, "Markdent::Event::AutoLink" : { "file" : "lib/Markdent/Event/AutoLink.pm", "version" : "0.33" }, "Markdent::Event::CodeBlock" : { "file" : "lib/Markdent/Event/CodeBlock.pm", "version" : "0.33" }, "Markdent::Event::EndBlockquote" : { "file" : "lib/Markdent/Event/EndBlockquote.pm", "version" : "0.33" }, "Markdent::Event::EndCode" : { "file" : "lib/Markdent/Event/EndCode.pm", "version" : "0.33" }, "Markdent::Event::EndDocument" : { "file" : "lib/Markdent/Event/EndDocument.pm", "version" : "0.33" }, "Markdent::Event::EndEmphasis" : { "file" : "lib/Markdent/Event/EndEmphasis.pm", "version" : "0.33" }, "Markdent::Event::EndHTMLTag" : { "file" : "lib/Markdent/Event/EndHTMLTag.pm", "version" : "0.33" }, "Markdent::Event::EndHeader" : { "file" : "lib/Markdent/Event/EndHeader.pm", "version" : "0.33" }, "Markdent::Event::EndLink" : { "file" : "lib/Markdent/Event/EndLink.pm", "version" : "0.33" }, "Markdent::Event::EndListItem" : { "file" : "lib/Markdent/Event/EndListItem.pm", "version" : "0.33" }, "Markdent::Event::EndOrderedList" : { "file" : "lib/Markdent/Event/EndOrderedList.pm", "version" : "0.33" }, "Markdent::Event::EndParagraph" : { "file" : "lib/Markdent/Event/EndParagraph.pm", "version" : "0.33" }, "Markdent::Event::EndStrong" : { "file" : "lib/Markdent/Event/EndStrong.pm", "version" : "0.33" }, "Markdent::Event::EndTable" : { "file" : "lib/Markdent/Event/EndTable.pm", "version" : "0.33" }, "Markdent::Event::EndTableBody" : { "file" : "lib/Markdent/Event/EndTableBody.pm", "version" : "0.33" }, "Markdent::Event::EndTableCell" : { "file" : "lib/Markdent/Event/EndTableCell.pm", "version" : "0.33" }, "Markdent::Event::EndTableHeader" : { "file" : "lib/Markdent/Event/EndTableHeader.pm", "version" : "0.33" }, "Markdent::Event::EndTableRow" : { "file" : "lib/Markdent/Event/EndTableRow.pm", "version" : "0.33" }, "Markdent::Event::EndUnorderedList" : { "file" : "lib/Markdent/Event/EndUnorderedList.pm", "version" : "0.33" }, "Markdent::Event::HTMLBlock" : { "file" : "lib/Markdent/Event/HTMLBlock.pm", "version" : "0.33" }, "Markdent::Event::HTMLComment" : { "file" : "lib/Markdent/Event/HTMLComment.pm", "version" : "0.33" }, "Markdent::Event::HTMLCommentBlock" : { "file" : "lib/Markdent/Event/HTMLCommentBlock.pm", "version" : "0.33" }, "Markdent::Event::HTMLEntity" : { "file" : "lib/Markdent/Event/HTMLEntity.pm", "version" : "0.33" }, "Markdent::Event::HTMLTag" : { "file" : "lib/Markdent/Event/HTMLTag.pm", "version" : "0.33" }, "Markdent::Event::HorizontalRule" : { "file" : "lib/Markdent/Event/HorizontalRule.pm", "version" : "0.33" }, "Markdent::Event::Image" : { "file" : "lib/Markdent/Event/Image.pm", "version" : "0.33" }, "Markdent::Event::LineBreak" : { "file" : "lib/Markdent/Event/LineBreak.pm", "version" : "0.33" }, "Markdent::Event::Preformatted" : { "file" : "lib/Markdent/Event/Preformatted.pm", "version" : "0.33" }, "Markdent::Event::StartBlockquote" : { "file" : "lib/Markdent/Event/StartBlockquote.pm", "version" : "0.33" }, "Markdent::Event::StartCode" : { "file" : "lib/Markdent/Event/StartCode.pm", "version" : "0.33" }, "Markdent::Event::StartDocument" : { "file" : "lib/Markdent/Event/StartDocument.pm", "version" : "0.33" }, "Markdent::Event::StartEmphasis" : { "file" : "lib/Markdent/Event/StartEmphasis.pm", "version" : "0.33" }, "Markdent::Event::StartHTMLTag" : { "file" : "lib/Markdent/Event/StartHTMLTag.pm", "version" : "0.33" }, "Markdent::Event::StartHeader" : { "file" : "lib/Markdent/Event/StartHeader.pm", "version" : "0.33" }, "Markdent::Event::StartLink" : { "file" : "lib/Markdent/Event/StartLink.pm", "version" : "0.33" }, "Markdent::Event::StartListItem" : { "file" : "lib/Markdent/Event/StartListItem.pm", "version" : "0.33" }, "Markdent::Event::StartOrderedList" : { "file" : "lib/Markdent/Event/StartOrderedList.pm", "version" : "0.33" }, "Markdent::Event::StartParagraph" : { "file" : "lib/Markdent/Event/StartParagraph.pm", "version" : "0.33" }, "Markdent::Event::StartStrong" : { "file" : "lib/Markdent/Event/StartStrong.pm", "version" : "0.33" }, "Markdent::Event::StartTable" : { "file" : "lib/Markdent/Event/StartTable.pm", "version" : "0.33" }, "Markdent::Event::StartTableBody" : { "file" : "lib/Markdent/Event/StartTableBody.pm", "version" : "0.33" }, "Markdent::Event::StartTableCell" : { "file" : "lib/Markdent/Event/StartTableCell.pm", "version" : "0.33" }, "Markdent::Event::StartTableHeader" : { "file" : "lib/Markdent/Event/StartTableHeader.pm", "version" : "0.33" }, "Markdent::Event::StartTableRow" : { "file" : "lib/Markdent/Event/StartTableRow.pm", "version" : "0.33" }, "Markdent::Event::StartUnorderedList" : { "file" : "lib/Markdent/Event/StartUnorderedList.pm", "version" : "0.33" }, "Markdent::Event::Text" : { "file" : "lib/Markdent/Event/Text.pm", "version" : "0.33" }, "Markdent::Handler::CaptureEvents" : { "file" : "lib/Markdent/Handler/CaptureEvents.pm", "version" : "0.33" }, "Markdent::Handler::HTMLFilter" : { "file" : "lib/Markdent/Handler/HTMLFilter.pm", "version" : "0.33" }, "Markdent::Handler::HTMLStream::Document" : { "file" : "lib/Markdent/Handler/HTMLStream/Document.pm", "version" : "0.33" }, "Markdent::Handler::HTMLStream::Fragment" : { "file" : "lib/Markdent/Handler/HTMLStream/Fragment.pm", "version" : "0.33" }, "Markdent::Handler::MinimalTree" : { "file" : "lib/Markdent/Handler/MinimalTree.pm", "version" : "0.33" }, "Markdent::Handler::Multiplexer" : { "file" : "lib/Markdent/Handler/Multiplexer.pm", "version" : "0.33" }, "Markdent::Handler::Null" : { "file" : "lib/Markdent/Handler/Null.pm", "version" : "0.33" }, "Markdent::Parser" : { "file" : "lib/Markdent/Parser.pm", "version" : "0.33" }, "Markdent::Parser::BlockParser" : { "file" : "lib/Markdent/Parser/BlockParser.pm", "version" : "0.33" }, "Markdent::Parser::SpanParser" : { "file" : "lib/Markdent/Parser/SpanParser.pm", "version" : "0.33" }, "Markdent::Regexes" : { "file" : "lib/Markdent/Regexes.pm", "version" : "0.33" }, "Markdent::Role::AnyParser" : { "file" : "lib/Markdent/Role/AnyParser.pm", "version" : "0.33" }, "Markdent::Role::BalancedEvent" : { "file" : "lib/Markdent/Role/BalancedEvent.pm", "version" : "0.33" }, "Markdent::Role::BlockParser" : { "file" : "lib/Markdent/Role/BlockParser.pm", "version" : "0.33" }, "Markdent::Role::DebugPrinter" : { "file" : "lib/Markdent/Role/DebugPrinter.pm", "version" : "0.33" }, "Markdent::Role::Dialect::BlockParser" : { "file" : "lib/Markdent/Role/Dialect/BlockParser.pm", "version" : "0.33" }, "Markdent::Role::Dialect::SpanParser" : { "file" : "lib/Markdent/Role/Dialect/SpanParser.pm", "version" : "0.33" }, "Markdent::Role::Event" : { "file" : "lib/Markdent/Role/Event.pm", "version" : "0.33" }, "Markdent::Role::EventAsText" : { "file" : "lib/Markdent/Role/EventAsText.pm", "version" : "0.33" }, "Markdent::Role::EventsAsMethods" : { "file" : "lib/Markdent/Role/EventsAsMethods.pm", "version" : "0.33" }, "Markdent::Role::FilterHandler" : { "file" : "lib/Markdent/Role/FilterHandler.pm", "version" : "0.33" }, "Markdent::Role::HTMLStream" : { "file" : "lib/Markdent/Role/HTMLStream.pm", "version" : "0.33" }, "Markdent::Role::Handler" : { "file" : "lib/Markdent/Role/Handler.pm", "version" : "0.33" }, "Markdent::Role::Simple" : { "file" : "lib/Markdent/Role/Simple.pm", "version" : "0.33" }, "Markdent::Role::SpanParser" : { "file" : "lib/Markdent/Role/SpanParser.pm", "version" : "0.33" }, "Markdent::Simple::Document" : { "file" : "lib/Markdent/Simple/Document.pm", "version" : "0.33" }, "Markdent::Simple::Fragment" : { "file" : "lib/Markdent/Simple/Fragment.pm", "version" : "0.33" }, "Markdent::Types" : { "file" : "lib/Markdent/Types.pm", "version" : "0.33" }, "Markdent::Types::Internal" : { "file" : "lib/Markdent/Types/Internal.pm", "version" : "0.33" } }, "release_status" : "stable", "resources" : { "bugtracker" : { "web" : "https://github.com/houseabsolute/Markdent/issues" }, "homepage" : "http://metacpan.org/release/Markdent", "repository" : { "type" : "git", "url" : "git://github.com/houseabsolute/Markdent.git", "web" : "https://github.com/houseabsolute/Markdent" } }, "version" : "0.33", "x_Dist_Zilla" : { "perl" : { "version" : "5.026002" }, "plugins" : [ { "class" : "Dist::Zilla::Plugin::Git::GatherDir", "config" : { "Dist::Zilla::Plugin::GatherDir" : { "exclude_filename" : [ "CODE_OF_CONDUCT.md", "CONTRIBUTING.md", "LICENSE", "Makefile.PL", "README.md", "cpanfile" ], "exclude_match" : [], "follow_symlinks" : 0, "include_dotfiles" : 0, "prefix" : "", "prune_directory" : [], "root" : "." }, "Dist::Zilla::Plugin::Git::GatherDir" : { "include_untracked" : 0 } }, "name" : "@DROLSKY/Git::GatherDir", "version" : "2.045" }, { "class" : "Dist::Zilla::Plugin::ManifestSkip", "name" : "@DROLSKY/ManifestSkip", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::License", "name" : "@DROLSKY/License", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::ExecDir", "name" : "@DROLSKY/ExecDir", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::ShareDir", "name" : "@DROLSKY/ShareDir", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::Manifest", "name" : "@DROLSKY/Manifest", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::CheckVersionIncrement", "name" : "@DROLSKY/CheckVersionIncrement", "version" : "0.121750" }, { "class" : "Dist::Zilla::Plugin::TestRelease", "name" : "@DROLSKY/TestRelease", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::ConfirmRelease", "name" : "@DROLSKY/ConfirmRelease", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::UploadToCPAN", "name" : "@DROLSKY/UploadToCPAN", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::VersionFromMainModule", "config" : { "Dist::Zilla::Role::ModuleMetadata" : { "Module::Metadata" : "1.000033", "version" : "0.006" } }, "name" : "@DROLSKY/VersionFromMainModule", "version" : "0.04" }, { "class" : "Dist::Zilla::Plugin::Authority", "name" : "@DROLSKY/Authority", "version" : "1.009" }, { "class" : "Dist::Zilla::Plugin::AutoPrereqs", "name" : "@DROLSKY/AutoPrereqs", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::CopyFilesFromBuild", "name" : "@DROLSKY/CopyFilesFromBuild", "version" : "0.170880" }, { "class" : "Dist::Zilla::Plugin::GitHub::Meta", "name" : "@DROLSKY/GitHub::Meta", "version" : "0.47" }, { "class" : "Dist::Zilla::Plugin::GitHub::Update", "config" : { "Dist::Zilla::Plugin::GitHub::Update" : { "metacpan" : 1 } }, "name" : "@DROLSKY/GitHub::Update", "version" : "0.47" }, { "class" : "Dist::Zilla::Plugin::MetaResources", "name" : "@DROLSKY/MetaResources", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::MetaProvides::Package", "config" : { "Dist::Zilla::Plugin::MetaProvides::Package" : { "finder_objects" : [ { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : "@DROLSKY/MetaProvides::Package/AUTOVIV/:InstallModulesPM", "version" : "6.012" } ], "include_underscores" : 0 }, "Dist::Zilla::Role::MetaProvider::Provider" : { "$Dist::Zilla::Role::MetaProvider::Provider::VERSION" : "2.002004", "inherit_missing" : 1, "inherit_version" : 1, "meta_noindex" : 1 }, "Dist::Zilla::Role::ModuleMetadata" : { "Module::Metadata" : "1.000033", "version" : "0.006" } }, "name" : "@DROLSKY/MetaProvides::Package", "version" : "2.004003" }, { "class" : "Dist::Zilla::Plugin::Meta::Contributors", "name" : "@DROLSKY/Meta::Contributors", "version" : "0.003" }, { "class" : "Dist::Zilla::Plugin::MetaConfig", "name" : "@DROLSKY/MetaConfig", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::MetaJSON", "name" : "@DROLSKY/MetaJSON", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::MetaYAML", "name" : "@DROLSKY/MetaYAML", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::NextRelease", "name" : "@DROLSKY/NextRelease", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "test", "type" : "requires" } }, "name" : "@DROLSKY/Test::More with Test2", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "develop", "type" : "requires" } }, "name" : "@DROLSKY/Modules for use with tidyall", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "develop", "type" : "requires" } }, "name" : "@DROLSKY/Test::Version which fixes https://github.com/plicease/Test-Version/issues/7", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::PromptIfStale", "config" : { "Dist::Zilla::Plugin::PromptIfStale" : { "check_all_plugins" : 0, "check_all_prereqs" : 0, "modules" : [ "Dist::Zilla::PluginBundle::DROLSKY" ], "phase" : "build", "run_under_travis" : 0, "skip" : [] } }, "name" : "@DROLSKY/Dist::Zilla::PluginBundle::DROLSKY", "version" : "0.055" }, { "class" : "Dist::Zilla::Plugin::PromptIfStale", "config" : { "Dist::Zilla::Plugin::PromptIfStale" : { "check_all_plugins" : 1, "check_all_prereqs" : 1, "modules" : [], "phase" : "release", "run_under_travis" : 0, "skip" : [ "Dist::Zilla::Plugin::DROLSKY::Contributors", "Dist::Zilla::Plugin::DROLSKY::Git::CheckFor::CorrectBranch", "Dist::Zilla::Plugin::DROLSKY::License", "Dist::Zilla::Plugin::DROLSKY::TidyAll", "Dist::Zilla::Plugin::DROLSKY::WeaverConfig", "Pod::Weaver::PluginBundle::DROLSKY" ] } }, "name" : "@DROLSKY/PromptIfStale", "version" : "0.055" }, { "class" : "Dist::Zilla::Plugin::Test::PodSpelling", "config" : { "Dist::Zilla::Plugin::Test::PodSpelling" : { "directories" : [ "bin", "lib" ], "spell_cmd" : "", "stopwords" : [ "API", "CLI", "CaptureEvents", "DROLSKY", "DROLSKY's", "EndCode", "GitHub", "Gruber", "Gruber's", "HTMLStream", "MARKDENT", "Markdent", "Markdent's", "Markdown", "PayPal", "PayPal", "Rolsky", "Rolsky", "Rolsky's", "SHAs", "StartCode", "StartEmphasis", "StartLink", "XML's", "blockquote", "blockquotes", "colspan", "doctype", "drolsky", "escapeable", "esque", "html", "inline", "lang", "mdtest", "namespace", "parameterized", "parser's", "parsers", "preformatted", "unordered", "uri", "wiki" ], "wordlist" : "Pod::Wordlist" } }, "name" : "@DROLSKY/Test::PodSpelling", "version" : "2.007005" }, { "class" : "Dist::Zilla::Plugin::PodSyntaxTests", "name" : "@DROLSKY/PodSyntaxTests", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::DROLSKY::RunExtraTests", "config" : { "Dist::Zilla::Role::TestRunner" : { "default_jobs" : 24 } }, "name" : "@DROLSKY/DROLSKY::RunExtraTests", "version" : "1.01" }, { "class" : "Dist::Zilla::Plugin::MojibakeTests", "name" : "@DROLSKY/MojibakeTests", "version" : "0.8" }, { "class" : "Dist::Zilla::Plugin::Test::CleanNamespaces", "config" : { "Dist::Zilla::Plugin::Test::CleanNamespaces" : { "filename" : "xt/author/clean-namespaces.t", "skips" : [ "^Markdent::(?:Regexes|Types(?:::Internal)?)$" ] } }, "name" : "@DROLSKY/Test::CleanNamespaces", "version" : "0.006" }, { "class" : "Dist::Zilla::Plugin::Test::CPAN::Changes", "config" : { "Dist::Zilla::Plugin::Test::CPAN::Changes" : { "changelog" : "Changes" } }, "name" : "@DROLSKY/Test::CPAN::Changes", "version" : "0.012" }, { "class" : "Dist::Zilla::Plugin::Test::CPAN::Meta::JSON", "name" : "@DROLSKY/Test::CPAN::Meta::JSON", "version" : "0.004" }, { "class" : "Dist::Zilla::Plugin::Test::TidyAll", "name" : "@DROLSKY/Test::TidyAll", "version" : "0.04" }, { "class" : "Dist::Zilla::Plugin::Test::Compile", "config" : { "Dist::Zilla::Plugin::Test::Compile" : { "bail_out_on_fail" : 0, "fail_on_warning" : "author", "fake_home" : 0, "filename" : "xt/author/00-compile.t", "module_finder" : [ ":InstallModules" ], "needs_display" : 0, "phase" : "develop", "script_finder" : [ ":PerlExecFiles" ], "skips" : [], "switch" : [] } }, "name" : "@DROLSKY/Test::Compile", "version" : "2.058" }, { "class" : "Dist::Zilla::Plugin::Test::ReportPrereqs", "name" : "@DROLSKY/Test::ReportPrereqs", "version" : "0.027" }, { "class" : "Dist::Zilla::Plugin::Test::Version", "name" : "@DROLSKY/Test::Version", "version" : "1.09" }, { "class" : "Dist::Zilla::Plugin::DROLSKY::Contributors", "name" : "@DROLSKY/DROLSKY::Contributors", "version" : "1.01" }, { "class" : "Dist::Zilla::Plugin::Git::Contributors", "config" : { "Dist::Zilla::Plugin::Git::Contributors" : { "git_version" : "2.20.1", "include_authors" : 0, "include_releaser" : 1, "order_by" : "name", "paths" : [] } }, "name" : "@DROLSKY/Git::Contributors", "version" : "0.035" }, { "class" : "Dist::Zilla::Plugin::SurgicalPodWeaver", "config" : { "Dist::Zilla::Plugin::PodWeaver" : { "config_plugins" : [ "@DROLSKY" ], "finder" : [ ":InstallModules", ":ExecFiles" ], "plugins" : [ { "class" : "Pod::Weaver::Plugin::EnsurePod5", "name" : "@CorePrep/EnsurePod5", "version" : "4.015" }, { "class" : "Pod::Weaver::Plugin::H1Nester", "name" : "@CorePrep/H1Nester", "version" : "4.015" }, { "class" : "Pod::Weaver::Plugin::SingleEncoding", "name" : "@DROLSKY/SingleEncoding", "version" : "4.015" }, { "class" : "Pod::Weaver::Plugin::Transformer", "name" : "@DROLSKY/List", "version" : "4.015" }, { "class" : "Pod::Weaver::Plugin::Transformer", "name" : "@DROLSKY/Verbatim", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Region", "name" : "@DROLSKY/header", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Name", "name" : "@DROLSKY/Name", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Version", "name" : "@DROLSKY/Version", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Region", "name" : "@DROLSKY/prelude", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "SYNOPSIS", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "DESCRIPTION", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "OVERVIEW", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "ATTRIBUTES", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "METHODS", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "FUNCTIONS", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "TYPES", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Leftovers", "name" : "@DROLSKY/Leftovers", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Region", "name" : "@DROLSKY/postlude", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::GenerateSection", "name" : "@DROLSKY/generate SUPPORT", "version" : "1.06" }, { "class" : "Pod::Weaver::Section::AllowOverride", "name" : "@DROLSKY/allow override SUPPORT", "version" : "0.05" }, { "class" : "Pod::Weaver::Section::GenerateSection", "name" : "@DROLSKY/generate SOURCE", "version" : "1.06" }, { "class" : "Pod::Weaver::Section::GenerateSection", "name" : "@DROLSKY/generate DONATIONS", "version" : "1.06" }, { "class" : "Pod::Weaver::Section::Authors", "name" : "@DROLSKY/Authors", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Contributors", "name" : "@DROLSKY/Contributors", "version" : "0.009" }, { "class" : "Pod::Weaver::Section::Legal", "name" : "@DROLSKY/Legal", "version" : "4.015" }, { "class" : "Pod::Weaver::Section::Region", "name" : "@DROLSKY/footer", "version" : "4.015" } ] } }, "name" : "@DROLSKY/SurgicalPodWeaver", "version" : "0.0023" }, { "class" : "Dist::Zilla::Plugin::DROLSKY::WeaverConfig", "name" : "@DROLSKY/DROLSKY::WeaverConfig", "version" : "1.01" }, { "class" : "Dist::Zilla::Plugin::ReadmeAnyFromPod", "config" : { "Dist::Zilla::Role::FileWatcher" : { "version" : "0.006" } }, "name" : "@DROLSKY/README.md in build", "version" : "0.163250" }, { "class" : "Dist::Zilla::Plugin::GenerateFile::FromShareDir", "config" : { "Dist::Zilla::Plugin::GenerateFile::FromShareDir" : { "destination_filename" : "CONTRIBUTING.md", "dist" : "Dist-Zilla-PluginBundle-DROLSKY", "encoding" : "UTF-8", "has_xs" : 0, "location" : "build", "source_filename" : "CONTRIBUTING.md" }, "Dist::Zilla::Role::RepoFileInjector" : { "allow_overwrite" : 1, "repo_root" : ".", "version" : "0.009" } }, "name" : "@DROLSKY/Generate CONTRIBUTING.md", "version" : "0.014" }, { "class" : "Dist::Zilla::Plugin::GenerateFile::FromShareDir", "config" : { "Dist::Zilla::Plugin::GenerateFile::FromShareDir" : { "destination_filename" : "CODE_OF_CONDUCT.md", "dist" : "Dist-Zilla-PluginBundle-DROLSKY", "encoding" : "UTF-8", "has_xs" : 0, "location" : "build", "source_filename" : "CODE_OF_CONDUCT.md" }, "Dist::Zilla::Role::RepoFileInjector" : { "allow_overwrite" : 1, "repo_root" : ".", "version" : "0.009" } }, "name" : "@DROLSKY/Generate CODE_OF_CONDUCT.md", "version" : "0.014" }, { "class" : "Dist::Zilla::Plugin::InstallGuide", "name" : "@DROLSKY/InstallGuide", "version" : "1.200012" }, { "class" : "Dist::Zilla::Plugin::CPANFile", "name" : "@DROLSKY/CPANFile", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::DROLSKY::License", "name" : "@DROLSKY/DROLSKY::License", "version" : "1.01" }, { "class" : "Dist::Zilla::Plugin::CheckStrictVersion", "name" : "@DROLSKY/CheckStrictVersion", "version" : "0.001" }, { "class" : "Dist::Zilla::Plugin::CheckSelfDependency", "config" : { "Dist::Zilla::Plugin::CheckSelfDependency" : { "finder" : [ ":InstallModules" ] }, "Dist::Zilla::Role::ModuleMetadata" : { "Module::Metadata" : "1.000033", "version" : "0.006" } }, "name" : "@DROLSKY/CheckSelfDependency", "version" : "0.011" }, { "class" : "Dist::Zilla::Plugin::CheckPrereqsIndexed", "name" : "@DROLSKY/CheckPrereqsIndexed", "version" : "0.020" }, { "class" : "Dist::Zilla::Plugin::DROLSKY::Git::CheckFor::CorrectBranch", "config" : { "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.20.1", "repo_root" : "." } }, "name" : "@DROLSKY/DROLSKY::Git::CheckFor::CorrectBranch", "version" : "1.01" }, { "class" : "Dist::Zilla::Plugin::EnsureChangesHasContent", "name" : "@DROLSKY/EnsureChangesHasContent", "version" : "0.02" }, { "class" : "Dist::Zilla::Plugin::DROLSKY::TidyAll", "name" : "@DROLSKY/DROLSKY::TidyAll", "version" : "1.01" }, { "class" : "Dist::Zilla::Plugin::Git::Check", "config" : { "Dist::Zilla::Plugin::Git::Check" : { "untracked_files" : "die" }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [ "CODE_OF_CONDUCT.md", "CONTRIBUTING.md", "Changes", "LICENSE", "Makefile.PL", "README.md", "cpanfile", "tidyall.ini" ], "allow_dirty_match" : [], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.20.1", "repo_root" : "." } }, "name" : "@DROLSKY/Git::Check", "version" : "2.045" }, { "class" : "Dist::Zilla::Plugin::Git::Commit", "config" : { "Dist::Zilla::Plugin::Git::Commit" : { "add_files_in" : [], "commit_msg" : "v%v%n%n%c" }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [ "CODE_OF_CONDUCT.md", "CONTRIBUTING.md", "Changes", "LICENSE", "Makefile.PL", "README.md", "cpanfile", "tidyall.ini" ], "allow_dirty_match" : [], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.20.1", "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "@DROLSKY/Commit generated files", "version" : "2.045" }, { "class" : "Dist::Zilla::Plugin::Git::Tag", "config" : { "Dist::Zilla::Plugin::Git::Tag" : { "branch" : null, "changelog" : "Changes", "signed" : 0, "tag" : "v0.33", "tag_format" : "v%v", "tag_message" : "v%v" }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.20.1", "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "@DROLSKY/Git::Tag", "version" : "2.045" }, { "class" : "Dist::Zilla::Plugin::Git::Push", "config" : { "Dist::Zilla::Plugin::Git::Push" : { "push_to" : [ "origin" ], "remotes_must_exist" : 1 }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.20.1", "repo_root" : "." } }, "name" : "@DROLSKY/Git::Push", "version" : "2.045" }, { "class" : "Dist::Zilla::Plugin::BumpVersionAfterRelease", "config" : { "Dist::Zilla::Plugin::BumpVersionAfterRelease" : { "finders" : [ ":ExecFiles", ":InstallModules" ], "global" : 0, "munge_makefile_pl" : 1 } }, "name" : "@DROLSKY/BumpVersionAfterRelease", "version" : "0.018" }, { "class" : "Dist::Zilla::Plugin::Git::Commit", "config" : { "Dist::Zilla::Plugin::Git::Commit" : { "add_files_in" : [], "commit_msg" : "Bump version after release" }, "Dist::Zilla::Role::Git::DirtyFiles" : { "allow_dirty" : [ "Changes", "dist.ini" ], "allow_dirty_match" : [ "(?^:.+)" ], "changelog" : "Changes" }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.20.1", "repo_root" : "." }, "Dist::Zilla::Role::Git::StringFormatter" : { "time_zone" : "local" } }, "name" : "@DROLSKY/Commit version bump", "version" : "2.045" }, { "class" : "Dist::Zilla::Plugin::Git::Push", "config" : { "Dist::Zilla::Plugin::Git::Push" : { "push_to" : [ "origin" ], "remotes_must_exist" : 1 }, "Dist::Zilla::Role::Git::Repo" : { "git_version" : "2.20.1", "repo_root" : "." } }, "name" : "@DROLSKY/Push version bump", "version" : "2.045" }, { "class" : "Dist::Zilla::Plugin::DROLSKY::MakeMaker", "config" : { "Dist::Zilla::Plugin::MakeMaker" : { "make_path" : "make", "version" : "6.012" }, "Dist::Zilla::Plugin::MakeMaker::Awesome" : { "version" : "0.42" }, "Dist::Zilla::Role::TestRunner" : { "default_jobs" : 24, "version" : "6.012" } }, "name" : "@DROLSKY/DROLSKY::MakeMaker", "version" : "1.01" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "develop", "type" : "requires" } }, "name" : "DevelopRequires", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":InstallModules", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":IncModules", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":TestFiles", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExtraTestFiles", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExecFiles", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":PerlExecFiles", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ShareFiles", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":MainModule", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":AllFiles", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":NoFiles", "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : "@DROLSKY/MetaProvides::Package/AUTOVIV/:InstallModulesPM", "version" : "6.012" } ], "zilla" : { "class" : "Dist::Zilla::Dist::Builder", "config" : { "is_trial" : 0 }, "version" : "6.012" } }, "x_authority" : "cpan:DROLSKY", "x_contributors" : [ "Andrew Speer ", "Denis Ibaev ", "Jason McIntosh ", "Polina Shubina <925043@mai.com>", "Shlomi Fish ", "Tom Hukins " ], "x_generated_by_perl" : "v5.26.2", "x_serialization_backend" : "Cpanel::JSON::XS version 4.02" } Markdent-0.33/CODE_OF_CONDUCT.md0000644000175000017500000000625413420436470015655 0ustar autarchautarch# Contributor Covenant Code of Conduct ## Our Pledge In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. ## Our Standards Examples of behavior that contributes to creating a positive environment include: * Using welcoming and inclusive language * Being respectful of differing viewpoints and experiences * Gracefully accepting constructive criticism * Focusing on what is best for the community * Showing empathy towards other community members Examples of unacceptable behavior by participants include: * The use of sexualized language or imagery and unwelcome sexual attention or advances * Trolling, insulting/derogatory comments, and personal or political attacks * Public or private harassment * Publishing others' private information, such as a physical or electronic address, without explicit permission * Other conduct which could reasonably be considered inappropriate in a professional setting ## Our Responsibilities Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. ## Scope This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at autarch@urth.org. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. ## Attribution This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html [homepage]: https://www.contributor-covenant.org Markdent-0.33/lib/0000755000175000017500000000000013420436470013615 5ustar autarchautarchMarkdent-0.33/lib/Markdent.pm0000644000175000017500000001412413420436470015722 0ustar autarchautarch## no critic (Moose::RequireMakeImmutable) package Markdent; use 5.010; use strict; use warnings; # The first version that completely worked with newer versions of Specio. use Moose 2.1802 (); our $VERSION = '0.33'; 1; # ABSTRACT: An event-based Markdown parser toolkit __END__ =pod =encoding UTF-8 =head1 NAME Markdent - An event-based Markdown parser toolkit =head1 VERSION version 0.33 =head1 SYNOPSIS use Markdent::Simple::Document; my $parser = Markdent::Simple::Document->new(); my $html = $parser->markdown_to_html( title => 'My Document', markdown => $markdown, ); =head1 DESCRIPTION This distribution provides a toolkit for parsing Markdown (and Markdown variants, aka dialects). Unlike the other Markdown Perl tools, this module can be used for more than just generating HTML. The core parser generates events (like XML's SAX), making it easy to analyze a Markdown document in any number of ways. If you're only interested in converting Markdown to HTML, you can use the L class to do this, although you can just as well use better battle-tested tools like L. See L for more details on how Markdent works and how you can use it. =head1 QUICK MARKDOWN TO HTML CONVERSION If you just want to do some quick Markdown to HTML conversion use either the L or L class. This distribution also ships with a command line tool called L. See that tool's documentation for details on how to use it. =head1 PROCESSING PIPELINES If you want to create a Markdown processing pipeline, start by looking at the various handler classes: =over 4 =item * L =item * L =item * L =item * L =item * L =back You will probably also want to write your own handler class as part of the pipeline. This will need to implement the L role. To do that you'll need to review the many C classes. Each event represents something seen by the parse, such as a piece of the start or end of a piece of block (paragraph, header) or span markup (strong, link) or some text. The start of a pipeline will generally be either the L or L class. =head1 CUSTOM DIALECTS You may also want to implement a custom dialect to add some additional features to the parser. Your parser classes will need to consume either the L or the L role. The best way to understand how a dialect is implemented is to look at one of the existing dialect classes: =over 4 =item * L =item * L =item * L =item * L =back You'll also need to dig into the core L and L classes in order to see h ow these dialects interact with the core parser. =head1 DONATIONS If you'd like to thank me for the work I've done on this module, please consider making a "donation" to me via PayPal. I spend a lot of free time creating free software, and would appreciate any support you'd care to offer. Please note that B in order for me to continue working on this particular software. I will continue to do so, inasmuch as I have in the past, for as long as it interests me. Similarly, a donation made in this way will probably not make me work on this software much more, unless I get so many donations that I can consider working on free software full time, which seems unlikely at best. To donate, log into PayPal and send money to autarch@urth.org or use the button on this page: L =head1 BUGS Please report any bugs or feature requests to C, or through the web interface at L. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. Bugs may be submitted at L. I am also usually active on IRC as 'autarch' on C. =head1 SOURCE The source code repository for Markdent can be found at L. =head1 DONATIONS If you'd like to thank me for the work I've done on this module, please consider making a "donation" to me via PayPal. I spend a lot of free time creating free software, and would appreciate any support you'd care to offer. Please note that B in order for me to continue working on this particular software. I will continue to do so, inasmuch as I have in the past, for as long as it interests me. Similarly, a donation made in this way will probably not make me work on this software much more, unless I get so many donations that I can consider working on free software full time (let's all have a chuckle at that together). To donate, log into PayPal and send money to autarch@urth.org, or use the button at L. =head1 AUTHOR Dave Rolsky =head1 CONTRIBUTORS =for stopwords Andrew Speer Denis Ibaev Jason McIntosh Polina Shubina Shlomi Fish Tom Hukins =over 4 =item * Andrew Speer =item * Denis Ibaev =item * Jason McIntosh =item * Polina Shubina <925043@mai.com> =item * Shlomi Fish =item * Tom Hukins =back =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2019 by Dave Rolsky. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. The full text of the license can be found in the F file included with this distribution. =cut Markdent-0.33/lib/Markdent/0000755000175000017500000000000013420436470015362 5ustar autarchautarchMarkdent-0.33/lib/Markdent/Types/0000755000175000017500000000000013420436470016466 5ustar autarchautarchMarkdent-0.33/lib/Markdent/Types/Internal.pm0000644000175000017500000000330313420436470020577 0ustar autarchautarchpackage Markdent::Types::Internal; use strict; use warnings; our $VERSION = '0.33'; use IO::Handle; use Specio::Declare; use Specio::Library::Builtins; use parent 'Specio::Exporter'; declare( 'HeaderLevel', parent => t('Int'), inline => sub {"$_[1] >= 1 && $_[1] <= 6"}, message_generator => sub {"Header level must be a number from 1-6 (not $_)"}, ); object_does_type( 'BlockParserDialectRole', role => 'Markdent::Role::Dialect::BlockParser', ); declare( 'BlockParserClass', parent => t('ClassName'), inline => sub { "$_[1]->can('does') && $_[1]->does('Markdent::Role::BlockParser')"; }, ); object_does_type( 'SpanParserDialectRole', role => 'Markdent::Role::Dialect::SpanParser', ); declare( 'SpanParserClass', parent => t('ClassName'), inline => sub { "$_[1]->can('does') && $_[1]->does('Markdent::Role::SpanParser')"; }, ); object_does_type( 'EventObject', role => 'Markdent::Role::Event', ); declare( 'ExistingFile', parent => t('Str'), inline => sub {"-f $_[1]"}, ); object_does_type( 'HandlerObject', role => 'Markdent::Role::Handler', ); declare( 'NonEmptyArrayRef', parent => t('ArrayRef'), inline => sub {"@{$_[1]} >= 1"}, ); declare( 'OutputStream', parent => t('Item'), inline => sub { sprintf( <<'EOF', t('FileHandle')->inline_check( $_[1] ), t('Object')->inline_check( $_[1] ), $_[1] ); ( %s || %s ) && %s->can('print') EOF }, message_generator => sub { 'The output stream must be a Perl file handle or an object with a print method'; }, ); enum( 'TableCellAlignment', values => [qw( left right center )], ); 1; Markdent-0.33/lib/Markdent/Parser/0000755000175000017500000000000013420436470016616 5ustar autarchautarchMarkdent-0.33/lib/Markdent/Parser/BlockParser.pm0000644000175000017500000005377613420436470021405 0ustar autarchautarchpackage Markdent::Parser::BlockParser; use strict; use warnings; use namespace::autoclean; our $VERSION = '0.33'; use Digest::SHA qw( sha1_hex ); use Encode qw( encode ); use Markdent::Event::StartDocument; use Markdent::Event::EndDocument; use Markdent::Event::StartBlockquote; use Markdent::Event::EndBlockquote; use Markdent::Event::StartHeader; use Markdent::Event::EndHeader; use Markdent::Event::StartListItem; use Markdent::Event::EndListItem; use Markdent::Event::StartOrderedList; use Markdent::Event::EndOrderedList; use Markdent::Event::StartParagraph; use Markdent::Event::EndParagraph; use Markdent::Event::StartUnorderedList; use Markdent::Event::EndUnorderedList; use Markdent::Event::HorizontalRule; use Markdent::Event::HTMLBlock; use Markdent::Event::HTMLCommentBlock; use Markdent::Event::Preformatted; use Markdent::Regexes qw( :block $HTMLComment ); use Markdent::Types; use Moose; use MooseX::SemiAffordanceAccessor; use MooseX::StrictConstructor; with 'Markdent::Role::BlockParser'; has __html_blocks => ( traits => ['Hash'], is => 'ro', isa => t( 'HashRef', of => t('Str') ), default => sub { {} }, init_arg => undef, handles => { _save_html_block => 'set', _get_html_block => 'get', }, ); has _list_level => ( traits => ['Counter'], is => 'rw', isa => t('Int'), default => 0, init_arg => undef, handles => { '_inc_list_level' => 'inc', '_dec_list_level' => 'dec', }, ); has _list_item_is_paragraph => ( traits => ['Bool'], is => 'ro', isa => t('Bool'), default => 0, init_arg => undef, handles => { _treat_list_item_as_paragraph => 'set', _treat_list_item_as_line => 'unset', }, ); sub parse_document { my $self = shift; my $text = shift; $self->_treat_list_item_as_line(); $self->_hash_html_blocks($text); $self->_span_parser()->extract_link_ids($text); $self->_parse_text($text); } { # Stolen from Text::Markdown, along with the whole "extract and replace # with hash" concept. my $block_names_re = qr{ p | div | h[1-6] | blockquote | pre | table | dl | ol | ul | script | noscript | form | fieldset | iframe | math | ins | del }xi; sub _hash_html_blocks { my $self = shift; my $text = shift; ${$text} =~ s{ ( $BlockStart ) ( ^ < ($block_names_re) [^>]* > (?s: .+? ) (?: \n )+ # This catches repetitions of the final closing block ) $BlockEnd } { ( $1 || q{} ) . $self->_hash_and_save_html($2) }egxm; # We need to treat
tags as blocks as well, but they don't have # an ending delimiter. ${$text} =~ s{ ( $BlockStart ) () } { ( $1 || q{} ) . $self->_hash_and_save_html($2) }egxm; return; } } sub _hash_and_save_html { my $self = shift; my $html = shift; my $sha1 = lc sha1_hex( encode( 'UTF-8', $html ) ); $self->_save_html_block( $sha1 => $html ); return 'html:' . $sha1 . "\n"; } sub _parse_text { my $self = shift; my $text = shift; my $last_pos; PARSE: while (1) { if ( $self->debug() && pos ${$text} ) { $self->_print_debug( "Remaining text:\n[\n" . substr( ${$text}, pos ${$text} ) . "\n]\n" ); } if ( ${$text} =~ / \G \p{Space}* \z /xgc ) { last; } my $current_pos = pos ${$text} || 0; if ( defined $last_pos && $last_pos == $current_pos ) { my $msg = "About to enter an endless loop (pos = $current_pos)!\n"; $msg .= "\n"; $msg .= substr( ${$text}, $last_pos ); $msg .= "\n"; die $msg; } my @look_for = $self->_possible_block_matches(); $self->_debug_look_for(@look_for); for my $block (@look_for) { my $meth = '_match_' . $block; $self->$meth($text) and next PARSE; } $last_pos = pos ${$text} || 0; } } sub _possible_block_matches { my $self = shift; my @look_for; push @look_for, qw( hashed_html horizontal_rule ) unless $self->_list_level(); push @look_for, qw( html_comment atx_header two_line_header blockquote preformatted list ); push @look_for, 'list_item' if $self->_list_level(); push @look_for, 'paragraph'; return @look_for; } ## no critic (Subroutines::ProhibitUnusedPrivateSubroutines) sub _match_hashed_html { my $self = shift; my $text = shift; return unless ${$text} =~ / \G $BlockStart ^ ( html:([0-9a-f]{40}) \n ) $BlockEnd /xmgc; my $html = $self->_get_html_block($2); return unless defined $html; $self->_debug_parse_result( $1, 'hashed html', ) if $self->debug(); $self->_send_event( HTMLBlock => html => $html, ); return 1; } sub _match_html_comment { my $self = shift; my $text = shift; return unless ${$text} =~ / \G $EmptyLine*? ^ \p{SpaceSeparator}{0,3} $HTMLComment $HorizontalWS* \n /xmgc; my $comment = $1; $self->_debug_parse_result( $comment, 'html comment block', ) if $self->debug(); $self->_detab_text( \$comment ); $self->_send_event( HTMLCommentBlock => text => $comment ); return 1; } my $AtxHeader = qr/ ^ (\#{1,6}) ( $HorizontalWS* \S .+? ) (?: $HorizontalWS* \#+ )? \n /xm; sub _match_atx_header { my $self = shift; my $text = shift; return unless ${$text} =~ / \G (?:$EmptyLines)? ($AtxHeader) /xmgc; my $level = length $2; my $header_text = $3 . "\n"; $self->_debug_parse_result( $1, 'atx header', [ level => $level ], ) if $self->debug(); $header_text =~ s/^$HorizontalWS*//; $self->_header( $level, $header_text ); return 1; } my $TwoLineHeader = qr/ ^ ( $HorizontalWS* \S # must have some non-ws .+ # anything else \n ) ^(=+|-+) # underline marking a header \n /xm; sub _match_two_line_header { my $self = shift; my $text = shift; return unless ${$text} =~ / \G (?:$EmptyLines)? ($TwoLineHeader) /xmgc; my $level = substr( $3, 0, 1 ) eq '=' ? 1 : 2; $self->_debug_parse_result( $1, 'two-line header', [ level => $level ], ) if $self->debug(); $self->_header( $level, $2 ); return 1; } sub _header { my $self = shift; my $level = shift; my $text = shift; $self->_send_event( StartHeader => level => $level ); $self->_span_parser()->parse_block($text); $self->_send_event( EndHeader => level => $level ); return 1; } my $HorizontalRule = qr/ ^ ( \p{SpaceSeparator}{0,3} (?: (?: \* \p{SpaceSeparator}? ){3,} | (?: - \p{SpaceSeparator}? ){3,} | (?: _ \p{SpaceSeparator}? ){3,} ) \n ) /xm; sub _match_horizontal_rule { my $self = shift; my $text = shift; return unless ${$text} =~ / \G (?:$EmptyLines)? $HorizontalRule /xmgc; $self->_debug_parse_result( $1, 'horizontal rule', ) if $self->debug(); $self->_send_event('HorizontalRule'); return 1; } sub _match_blockquote { my $self = shift; my $text = shift; return unless ${$text} =~ / \G $BlockStart ( ^ > $HorizontalWS* \S (?: .* \n )+? ) (?= $EmptyLine # ... an empty line ^ (?= \S # ... followed by content in column 1 ) (?! # ... which is not > # ... a blockquote $HorizontalWS* \S ) | \s* # or end of the document \z ) /xmgc; my $bq = $1; $self->_debug_parse_result( $bq, 'blockquote', ) if $self->debug(); $self->_send_event('StartBlockquote'); $bq =~ s/^>(?: \p{SpaceSeparator} | \t )?//gxm; # Even if the blockquote is inside a list, we want to look for paragraphs, # not list items. my $list_level = $self->_list_level(); $self->_set_list_level(0); # Dingus treats a new blockquote level as starting a new paragraph as # well. If we treat each change of blockquote level as starting a new # sub-document, we get the same behavior. for my $chunk ( $self->_split_chunks_on_regex( $bq, qr/^>(?: \p{SpaceSeparator} | \t )*\S/xm ) ) { $self->_parse_text( \$chunk ); } $self->_set_list_level($list_level); $self->_send_event('EndBlockquote'); return 1; } ## use critic sub _split_chunks_on_regex { my $self = shift; my $text = shift; my $regex = shift; my @chunks; my @chunk; my $in_regex = 0; for my $line ( split /\n/, $text ) { my $new_chunk; if ( $in_regex && $line !~ $regex ) { $in_regex = 0; $new_chunk = 1; } elsif ( $line =~ $regex && !$in_regex ) { $in_regex = 1; $new_chunk = 1; } if ($new_chunk) { push @chunks, join q{}, map { $_ . "\n" } @chunk if @chunk; @chunk = (); } push @chunk, $line; } push @chunks, join q{}, map { $_ . "\n" } @chunk if @chunk; return @chunks; } my $PreLine = qr/ ^ (?: \p{spaceSeparator}{4,} | \t ) $HorizontalWS* \S .* \n /xm; ## no critic (Subroutines::ProhibitUnusedPrivateSubroutines) sub _match_preformatted { my $self = shift; my $text = shift; return unless ${$text} =~ / \G $BlockStart ( (?: $PreLine (?:$EmptyLine)* )* $PreLine ) /xmgc; my $pre = $1; $self->_debug_parse_result( $pre, 'preformatted', ) if $self->debug(); $pre =~ s/^(?:\p{SpaceSeparator}{4}|\t)//gm; $self->_detab_text( \$pre ); $self->_send_event( Preformatted => text => $pre ); return 1; } ## use critic my $Bullet = qr/ (?: \p{SpaceSeparator}{0,3} ( [\+\*\-] # unordered list bullet | \d+\. # ordered list number ) ) $HorizontalWS+ /xm; sub _list_re { my $self = shift; my $block_start; if ( $self->_list_level() ) { $block_start = qr/(?: (?<= \n ) | $EmptyLines )/xm; } else { $block_start = qr/ $BlockStart /xm; } my $list = qr/ $block_start ( $Bullet (?: .* \n )+? ) /xm; return $list; } ## no critic (Subroutines::ProhibitUnusedPrivateSubroutines) sub _match_list { my $self = shift; my $text = shift; my $list_re = $self->_list_re(); return unless ${$text} =~ / \G $list_re (?= # list ends with $EmptyLine # ... an empty line (?: (?= $HorizontalRule # ... followed by a horizontal rule ) | (?= \S # ... or followed by content in column 1 ) (?! # ... which is not $Bullet # ... a bullet ) ) | \s* # or end of the document \z ) /xmgc; my $list = $1; my $bullet = $2; my $type = $bullet =~ /\d/ ? 'OrderedList' : 'UnorderedList'; $self->_debug_parse_result( $list, $type, ) if $self->debug(); $self->_send_event( 'Start' . $type ); $self->_inc_list_level(); my @items = $self->_split_list_items($list); $self->_handle_list_items( $type, @items ); $self->_dec_list_level(); $self->_send_event( 'End' . $type ); return 1; } ## use critic sub _split_list_items { my $self = shift; my $list = shift; my @items; my @chunk; for my $line ( split /\n/, $list ) { ## no critic (RegularExpressions::ProhibitCaptureWithoutTest) if ( $line =~ /^$Bullet/ && @chunk ) { ## use critic push @items, join q{}, map { $_ . "\n" } @chunk; @chunk = (); } push @chunk, $line; } push @items, join q{}, map { $_ . "\n" } @chunk if @chunk; return @items; } sub _handle_list_items { my $self = shift; my $type = shift; my @items = @_; my $ordinal_list_num = 1; for my $item (@items) { $item =~ s/^$Bullet//; ## no critic (RegularExpressions::ProhibitCaptureWithoutTest) my $bullet = $type eq 'OrderedList' ? ( $ordinal_list_num++ ) . q{.} : $1; ## use critic $self->_send_event( StartListItem => bullet => $bullet ); # This strips out indentation from any lines beyond the first. This # causes the block parser to see a sub-list as starting a new list # when it parses the entire item for blocks. $item =~ s/(?<=\n)^ (?: \p{SpaceSeparator}{4} | \t )//xgm; $self->_print_debug("Parsing list item for blocks:\n[$item]\n") if $self->debug(); # This is a hack to ensure that the last item in a loose list (each # item is a paragraph) also is treated as a paragraph, not just a list # item. if ( $item eq $items[-1] ) { if ( @items > 1 && $items[-2] =~ /^$EmptyLine\z/m ) { $self->_print_debug( "Treating last list item as a paragraph because previous item ends with empty line\n" ) if $self->debug(); $self->_treat_list_item_as_paragraph(); } else { $self->_treat_list_item_as_line(); } } elsif ( $item =~ /^$EmptyLine\z/m ) { $self->_print_debug( "Treating item as a paragraph because it ends with empty line\n" ) if $self->debug(); $self->_treat_list_item_as_paragraph(); } else { $self->_treat_list_item_as_line(); } $self->_parse_text( \$item ); $self->_send_event('EndListItem'); } } # A list item matches multiple lines of text without any separating # newlines. These lines stop when we see a blockquote or indented list # bullet. This match is only done inside a list, and lets us distinguish # between list items which contain paragraphs and those which don't. # ## no critic (Subroutines::ProhibitUnusedPrivateSubroutines) sub _match_list_item { my $self = shift; my $text = shift; return unless ${$text} =~ / \G ((?: ^ \p{SpaceSeparator}* \S .* \n )+?) (?= ^ $Bullet | ^ > \p{SpaceSeparator}* \S .* \n | \z ) /xmgc; $self->_debug_parse_result( $1, 'list_item', ) if $self->debug(); $self->_send_event('StartParagraph') if $self->_list_item_is_paragraph(); $self->_span_parser()->parse_block($1); $self->_send_event('EndParagraph') if $self->_list_item_is_paragraph(); return 1; } sub _match_paragraph { my $self = shift; my $text = shift; my $list_re = $self->_list_re(); # At this point anything that is not an empty line must be a paragraph. return unless ${$text} =~ / \G (?:$EmptyLines)? ((?: ^ \p{SpaceSeparator}* \S .* \n )+?) (?: $BlockEnd | (?= $HorizontalRule ) | (?= $TwoLineHeader ) | (?= $AtxHeader ) | (?= $list_re ) ) /xmgc; $self->_debug_parse_result( $1, 'paragraph', ) if $self->debug(); $self->_send_event('StartParagraph'); $self->_span_parser()->parse_block($1); $self->_send_event('EndParagraph'); return 1; } ## use critic __PACKAGE__->meta()->make_immutable(); 1; # ABSTRACT: Block parser for standard Markdown __END__ =pod =encoding UTF-8 =head1 NAME Markdent::Parser::BlockParser - Block parser for standard Markdown =head1 VERSION version 0.33 =head1 DESCRIPTION This class parses blocks for the standard Markdown dialect (as defined by Daring Fireball and mdtest). =head1 METHODS This class provides the following methods: =head2 Markdent::Parser::BlockParser->new( handler => $handler, span_parser => $span_parser ) Creates a new block parser object. You must provide a span parser object. =head2 $block_parser->parse_document(\$markdown) This method takes a reference to a markdown string and parses it for blocks. Each block which contains text (except preformatted text) will be parsed for span-level markup using this object's C. =head1 ROLES This class does the L, L, and L roles. =head1 BUGS See L for bug reporting details. Bugs may be submitted at L. I am also usually active on IRC as 'autarch' on C. =head1 SOURCE The source code repository for Markdent can be found at L. =head1 AUTHOR Dave Rolsky =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2019 by Dave Rolsky. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. The full text of the license can be found in the F file included with this distribution. =cut Markdent-0.33/lib/Markdent/Parser/SpanParser.pm0000644000175000017500000006032513420436470021240 0ustar autarchautarchpackage Markdent::Parser::SpanParser; use strict; use warnings; use namespace::autoclean; use re 'eval'; our $VERSION = '0.33'; use List::AllUtils qw( uniq ); use Markdent::Event::AutoLink; use Markdent::Event::EndCode; use Markdent::Event::EndEmphasis; use Markdent::Event::EndHTMLTag; use Markdent::Event::EndLink; use Markdent::Event::EndStrong; use Markdent::Event::HTMLComment; use Markdent::Event::HTMLEntity; use Markdent::Event::HTMLTag; use Markdent::Event::Image; use Markdent::Event::LineBreak; use Markdent::Event::StartCode; use Markdent::Event::StartEmphasis; use Markdent::Event::StartHTMLTag; use Markdent::Event::StartLink; use Markdent::Event::StartStrong; use Markdent::Event::Text; use Markdent::Regexes qw( $HTMLComment ); use Markdent::Types; use Moose; use MooseX::SemiAffordanceAccessor; use MooseX::StrictConstructor; with 'Markdent::Role::SpanParser'; has __pending_events => ( traits => ['Array'], is => 'rw', isa => t( 'ArrayRef', of => t('EventObject') ), default => sub { [] }, init_arg => undef, handles => { _pending_events => 'elements', _add_pending_event => 'push', _clear_pending_events => 'clear', }, ); has _span_text_buffer => ( traits => ['String'], is => 'ro', isa => t('Str'), default => q{}, init_arg => undef, handles => { _save_span_text => 'append', _has_span_text_buffer => 'length', _clear_span_text_buffer => 'clear', }, ); has _links_by_id => ( traits => ['Hash'], is => 'ro', isa => t( 'HashRef', of => t('ArrayRef') ), default => sub { {} }, init_arg => undef, handles => { _add_link_by_id => 'set', _get_link_by_id => 'get', }, ); has _emphasis_start_delimiter_re => ( is => 'ro', isa => t('RegexpRef'), lazy => 1, builder => '_build_emphasis_start_delimiter_re', init_arg => undef, ); has _escape_re => ( is => 'ro', isa => t('RegexpRef'), lazy => 1, builder => '_build_escape_re', init_arg => undef, ); has _line_break_re => ( is => 'ro', isa => t('RegexpRef'), lazy => 1, builder => '_build_line_break_re', init_arg => undef, ); has _escapable_chars => ( is => 'ro', isa => t( 'ArrayRef', of => t('Str') ), lazy => 1, builder => '_build_escapable_chars', ); sub extract_link_ids { my $self = shift; my $text = shift; ${$text} =~ s/ ^ \p{SpaceSeparator}{0,3} \[ ([^]]+) \] : \p{SpaceSeparator}* \n? \p{SpaceSeparator}* (.+) \n / $self->_process_id_for_link( $1, $2 ); /egxm; } sub _process_id_for_link { my $self = shift; my $id = shift; my $id_text = shift; $id_text =~ s/\s+$//; my ( $uri, $title ) = $self->_parse_uri_and_title($id_text); $self->_add_link_by_id( $id => [ $uri, $title ] ); return q{}; } sub _parse_uri_and_title { my $self = shift; my $text = shift; $text =~ s/^\s+|\s+$//g; my ( $uri, $title ) = split /(?:\p{SpaceSeparator}|\t)+/, $text, 2; $uri = q{} unless defined $uri; $uri =~ s/^<|>$//g; $title =~ s/^"|"$//g if defined $title; return ( $uri, $title ); } sub parse_block { my $self = shift; my $text = shift; $self->_print_debug("Parsing text for span-level markup\n\n$text\n") if $self->debug(); # Note that we have to pass a _reference_ to text in order to make sure # that we are matching the same variable with /g regexes each time. $self->_parse_text( \$text ); # This catches any bad start events that were found after the last end # event, or if there were _no_ end events at all. $self->_convert_invalid_start_events_to_text('is done'); $self->_debug_pending_events('before text merging'); $self->_merge_consecutive_text_events(); $self->_debug_pending_events('after text merging'); $self->handler()->handle_event($_) for $self->_pending_events(); $self->_clear_pending_events(); return; } sub _parse_text { my $self = shift; my $text = shift; PARSE: while (1) { if ( $self->debug() && pos ${$text} ) { $self->_print_debug( "Remaining text:\n[\n" . substr( ${$text}, pos ${$text} ) . "\n]\n" ); } if ( ${$text} =~ /\G\z/gc ) { $self->_event_for_text_buffer(); last; } my @look_for = $self->_possible_span_matches(); $self->_debug_look_for(@look_for); for my $span (@look_for) { my ( $markup, @args ) = ref $span ? @{$span} : $span; my $meth = '_match_' . $markup; $self->$meth( $text, @args ) and next PARSE; } $self->_match_plain_text($text); } } sub _possible_span_matches { my $self = shift; my %open = $self->_open_start_events_for_span( 'code', 'link' ); if ( my $event = $open{code} ) { return [ 'code_end', $event->delimiter() ]; } my @look_for = 'escape'; push @look_for, $self->_look_for_strong_and_emphasis(); push @look_for, 'code_start'; unless ( $open{link} ) { push @look_for, qw( auto_link link image ); } push @look_for, 'html_comment', 'html_tag', 'html_entity', 'line_break'; return @look_for; } sub _look_for_strong_and_emphasis { my $self = shift; my %open = $self->_open_start_events_for_span( 'strong', 'emphasis' ); # If we are in both, we need to try to end the most recent one first. if ( $open{strong} && $open{emphasis} ) { my $last_saw; for my $event ( $self->_pending_events() ) { my $event_name = $event->event_name; if ( $event_name eq 'start_strong' ) { $last_saw = 'strong'; } elsif ( $event_name eq 'start_emphasis' ) { $last_saw = 'emphasis'; } } my @order = $last_saw eq 'strong' ? qw( strong emphasis ) : qw( emphasis strong ); return map { [ $_ . '_end', $open{$_}->delimiter() ] } @order; } elsif ( $open{emphasis} ) { return ( 'strong_start', [ 'emphasis_end', $open{emphasis}->delimiter() ] ); } elsif ( $open{strong} ) { return ( [ 'strong_end', $open{strong}->delimiter() ], 'emphasis_start' ); } # We look for strong first since it's a longer version of emphasis (we # need to try to match ** before *). return ( 'strong_start', 'emphasis_start' ); } sub _open_start_events_for_span { my $self = shift; my %wanted_start = map { 'start_' . $_ => $_ } @_; my %wanted_end = map { 'end_' . $_ => $_ } @_; my %open; for my $event ( $self->_pending_events() ) { my $event_name = $event->event_name; $open{ $wanted_start{$event_name} } = $event if $wanted_start{$event_name}; delete $open{ $wanted_end{$event_name} } if $wanted_end{$event_name}; } return %open; } sub _build_emphasis_start_delimiter_re { my $self = shift; return qr/(?:\*|_)/; } sub _build_escapable_chars { return [ qw( \ ` * _ { } [ ] ( ) + - . ! < > ), '#' ]; } sub _build_escape_re { my $self = shift; my $chars = join q{}, uniq( @{ $self->_escapable_chars() } ); return qr/\\([\Q$chars\E])/; } sub _build_line_break_re { my $self = shift; return qr/\p{SpaceSeparator}{2}\n/; } ## no critic (Subroutines::ProhibitUnusedPrivateSubroutines) sub _match_escape { my $self = shift; my $text = shift; my $escape_re = $self->_escape_re(); return unless ${$text} =~ / \G ($escape_re) /xgc; $self->_print_debug("Interpreting as escaped character\n\n[$1]\n") if $self->debug(); $self->_save_span_text($2); return 1; } sub _match_strong_start { my $self = shift; my $text = shift; my ($delim) = $self->_match_delimiter_start( $text, qr/(?:\*\*|__)/ ) or return; my $event = $self->_make_event( StartStrong => delimiter => $delim ); $self->_markup_event($event); return 1; } sub _match_strong_end { my $self = shift; my $text = shift; my $delim = shift; $self->_match_delimiter_end( $text, qr/\Q$delim\E/ ) or return; my $event = $self->_make_event( EndStrong => delimiter => $delim ); $self->_markup_event($event); return 1; } sub _match_emphasis_start { my $self = shift; my $text = shift; my ($delim) = $self->_match_delimiter_start( $text, $self->_emphasis_start_delimiter_re(), ) or return; my $event = $self->_make_event( StartEmphasis => delimiter => $delim ); $self->_markup_event($event); return 1; } sub _match_emphasis_end { my $self = shift; my $text = shift; my $delim = shift; $self->_match_delimiter_end( $text, $self->_emphasis_end_delimiter_re($delim), ) or return; my $event = $self->_make_event( EndEmphasis => delimiter => $delim ); $self->_markup_event($event); return 1; } ## use critic sub _emphasis_end_delimiter_re { my $self = shift; my $delim = shift; return qr/\Q$delim\E/; } ## no critic (Subroutines::ProhibitUnusedPrivateSubroutines) sub _match_code_start { my $self = shift; my $text = shift; my ($delim) = $self->_match_delimiter_start( $text, qr/\`+\p{SpaceSeparator}*/ ) or return; $delim =~ s/\p{SpaceSeparator}*$//; my $event = $self->_make_event( StartCode => delimiter => $delim ); $self->_markup_event($event); return 1; } sub _match_code_end { my $self = shift; my $text = shift; my $delim = shift; $self->_match_delimiter_end( $text, qr/\p{SpaceSeparator}*\Q$delim/ ) or return; my $event = $self->_make_event( EndCode => delimiter => $delim ); $self->_markup_event($event); return 1; } sub _match_delimiter_start { my $self = shift; my $text = shift; my $delim = shift; return unless ${$text} =~ / \G ($delim)/xgc; return $1; } sub _match_delimiter_end { my $self = shift; my $text = shift; my $delim = shift; return unless ${$text} =~ /\G $delim /xgc; return 1; } sub _match_auto_link { my $self = shift; my $text = shift; return unless ${$text} =~ /\G <( (?:https?|mailto|ftp): [^>]+ ) >/xgc; my $link = $self->_make_event( AutoLink => uri => $1 ); $self->_markup_event($link); return 1; } # Stolen from Text::Markdown my $nested_brackets; $nested_brackets = qr{ (?> # Atomic matching [^\[\]]+ # Anything other than brackets | \[ (??{ $nested_brackets }) # Recursive set of nested brackets \] )* }x; # Also stolen from Text::Markdown my $nested_parens; $nested_parens = qr{ (?> # Atomic matching [^()]+ # Anything other than parens | \( (??{ $nested_parens }) # Recursive set of nested parens \) )* }x; sub _match_link { my $self = shift; my $text = shift; my $pos = pos ${$text} || 0; # For some inexplicable reason, this regex needs to be recreated each time # the method is called or $nested_brackets && $nested_parens are # undef. Presumably this has something to do with using it in a # subroutine's lexical scope (resetting the stack on each invocation?) return unless ${$text} =~ / \G \[ ($nested_brackets) \] # link or alt text (?: \( ($nested_parens) \) | \s* \[ ( [^]]* ) \] # an id (can be empty) )? # with no id or explicit uri, use text as id /xgc; my ( $link_text, $attr ) = $self->_link_match_results( $1, $2, $3 ); unless ( defined $attr->{uri} ) { pos ${$text} = $pos if defined $pos; return; } my $start = $self->_make_event( StartLink => %{$attr} ); $self->_markup_event($start); $self->_parse_text( \$link_text ); my $end = $self->_make_event('EndLink'); $self->_markup_event($end); return 1; } sub _match_image { my $self = shift; my $text = shift; my $pos = pos ${$text} || 0; return unless ${$text} =~ / \G ! \[ ($nested_brackets) \] # link or alt text (?: \( ($nested_parens) \) | \s* \[ ( [^]]* ) \] # an id (can be empty) )? # with no id or explicit uri, use text as id /xgc; my ( $alt_text, $attr ) = $self->_link_match_results( $1, $2, $3 ); unless ( defined $attr->{uri} ) { pos ${$text} = $pos if defined $pos; return; } $attr->{alt_text} = $alt_text; my $image = $self->_make_event( Image => %{$attr} ); $self->_markup_event($image); return 1; } ## use critic sub _link_match_results { my $self = shift; my $text = shift; my $uri_and_title = shift; my $id = shift; my %attr; if ( defined $uri_and_title ) { my ( $uri, $title ) = $self->_parse_uri_and_title($uri_and_title); $attr{uri} = $uri; $attr{title} = $title if defined $title; } else { unless ( defined $id && length $id ) { $id = $text; $attr{is_implicit_id} = 1; } $id =~ s/\s+/ /g; my $link = $self->_get_link_by_id($id) || []; $attr{uri} = $link->[0]; $attr{title} = $link->[1] if defined $link->[1]; $attr{id} = $id; } return ( $text, \%attr ); } ## no critic (Subroutines::ProhibitUnusedPrivateSubroutines) sub _match_html_comment { my $self = shift; my $text = shift; return unless ${$text} =~ / \G $HTMLComment /xgcs; my $comment = $1; $self->_detab_text( \$comment ); my $event = $self->_make_event( HTMLComment => text => $comment ); $self->_markup_event($event); return 1; } my %InlineTags = map { $_ => 1 } qw( area base basefont br col frame hr img input link meta param ); sub _match_html_tag { my $self = shift; my $text = shift; return unless ${$text} =~ /\G (< [^>]+ >)/xgc; my $tag = $1; my $event; if ( $tag =~ m{^$} ) { $event = $self->_make_event( EndHTMLTag => tag => $1 ); } else { $tag =~ s/^<|>$//g; my ( $tag_name, $attr ) = split /\s+/, $tag, 2; $attr =~ s{/\s*$}{} if defined $attr; my %attr; if ( defined $attr && $attr =~ /\S/ ) { for my $attr ( split /\s+/, $attr ) { if ( $attr =~ /=/ ) { my ( $attr_name, $val ) = split /=/, $attr; $val =~ s/^([\"\'])(.+)\1$/$2/g; $attr{$attr_name} = $val; } else { # A value-less attribute like in #