From 8ec8da0491ad89604700b3e29a227966f6d84ba1 Mon Sep 17 00:00:00 2001 From: Perl Tidy Date: Wed, 5 Dec 2018 15:38:52 -0500 Subject: no bug - reformat all the code using the new perltidy rules --- Bugzilla/Markdown/GFM.pm | 80 ++++++++++++++++++++++++------------------------ 1 file changed, 40 insertions(+), 40 deletions(-) (limited to 'Bugzilla/Markdown/GFM.pm') diff --git a/Bugzilla/Markdown/GFM.pm b/Bugzilla/Markdown/GFM.pm index 367dc7a53..437122093 100644 --- a/Bugzilla/Markdown/GFM.pm +++ b/Bugzilla/Markdown/GFM.pm @@ -17,55 +17,55 @@ use Bugzilla::Markdown::GFM::Node; our @EXPORT_OK = qw(cmark_markdown_to_html); my %OPTIONS = ( - default => 0, - sourcepos => ( 1 << 1 ), - hardbreaks => ( 1 << 2 ), - safe => ( 1 << 3 ), - nobreaks => ( 1 << 4 ), - normalize => ( 1 << 8 ), - validate_utf8 => ( 1 << 9 ), - smart => ( 1 << 10 ), - github_pre_lang => ( 1 << 11 ), - liberal_html_tag => ( 1 << 12 ), - footnotes => ( 1 << 13 ), - strikethrough_double_tilde => ( 1 << 14 ), - table_prefer_style_attributes => ( 1 << 15 ), + default => 0, + sourcepos => (1 << 1), + hardbreaks => (1 << 2), + safe => (1 << 3), + nobreaks => (1 << 4), + normalize => (1 << 8), + validate_utf8 => (1 << 9), + smart => (1 << 10), + github_pre_lang => (1 << 11), + liberal_html_tag => (1 << 12), + footnotes => (1 << 13), + strikethrough_double_tilde => (1 << 14), + table_prefer_style_attributes => (1 << 15), ); my $FFI = FFI::Platypus->new( - lib => [grep { not -l $_ } Alien::libcmark_gfm->dynamic_libs], -); + lib => [grep { not -l $_ } Alien::libcmark_gfm->dynamic_libs],); $FFI->custom_type( - markdown_options_t => { - native_type => 'int', - native_to_perl => sub { - my ($options) = @_; - my $result = {}; - foreach my $key (keys %OPTIONS) { - $result->{$key} = ($options & $OPTIONS{$key}) != 0; - } - return $result; - }, - perl_to_native => sub { - my ($options) = @_; - my $result = 0; - foreach my $key (keys %OPTIONS) { - if ($options->{$key}) { - $result |= $OPTIONS{$key}; - } - } - return $result; + markdown_options_t => { + native_type => 'int', + native_to_perl => sub { + my ($options) = @_; + my $result = {}; + foreach my $key (keys %OPTIONS) { + $result->{$key} = ($options & $OPTIONS{$key}) != 0; + } + return $result; + }, + perl_to_native => sub { + my ($options) = @_; + my $result = 0; + foreach my $key (keys %OPTIONS) { + if ($options->{$key}) { + $result |= $OPTIONS{$key}; } + } + return $result; } + } ); -$FFI->attach(cmark_markdown_to_html => ['opaque', 'int', 'markdown_options_t'] => 'string', - sub { - my $c_func = shift; - my($markdown, $markdown_length) = scalar_to_buffer $_[0]; - return $c_func->($markdown, $markdown_length, $_[1]); - } +$FFI->attach( + cmark_markdown_to_html => ['opaque', 'int', 'markdown_options_t'] => 'string', + sub { + my $c_func = shift; + my ($markdown, $markdown_length) = scalar_to_buffer $_[0]; + return $c_func->($markdown, $markdown_length, $_[1]); + } ); # This has to happen after something from the main lib is loaded -- cgit v1.2.3-24-g4f1b