« blib/lib/Markdown/Parser/FootnoteReference.pm
↑ Summary
lib/Markdown/Parser/FootnoteReference.pm »
| 1 | ##---------------------------------------------------------------------------- | ||
| 2 | ## Markdown Parser Only - ~/lib/Markdown/Parser/Text.pm | ||
| 3 | ## Version v0.3.0 | ||
| 4 | ## Copyright(c) 2022 DEGUEST Pte. Ltd. | ||
| 5 | ## Author: Jacques Deguest <jack@deguest.jp> | ||
| 6 | ## Created 2021/08/23 | ||
| 7 | ## Modified 2024/08/30 | ||
| 8 | ## All rights reserved | ||
| 9 | ## | ||
| 10 | ## This program is free software; you can redistribute it and/or modify it | ||
| 11 | ## under the same terms as Perl itself. | ||
| 12 | ##---------------------------------------------------------------------------- | ||
| 13 | package Markdown::Parser::Text; | ||
| 14 | BEGIN | ||
| 15 | { | ||
| 16 | use strict; | ||
| 17 | use warnings; | ||
| 18 | use parent qw( Markdown::Parser::Element ); | ||
| 19 | use vars qw( $VERSION ); | ||
| 20 | our $VERSION = 'v0.3.0'; | ||
| 21 | }; | ||
| 22 | |||
| 23 | use strict; | ||
| 24 | use warnings; | ||
| 25 | |||
| 26 | sub init | ||
| 27 | { | ||
| 28 | my $self = shift( @_ ); | ||
| 29 | $self->{text} = ''; | ||
| 30 | $self->{tag_name} = 'text'; | ||
| 31 | return( $self->SUPER::init( @_ ) ); | ||
| 32 | } | ||
| 33 | |||
| 34 | sub append { return( shift->text->append( @_ ) ); } | ||
| 35 | |||
| 36 | sub as_markdown { return( shift->text->scalar ); } | ||
| 37 | |||
| 38 | sub as_pod { return( shift->text->scalar ); } | ||
| 39 | |||
| 40 | sub as_string { return( shift->text->scalar ); } | ||
| 41 | |||
| 42 | sub text { return( shift->_set_get_scalar_as_object( 'text', @_ ) ); } | ||
| 43 | |||
| 44 | 1; | ||
| 45 | # NOTE: POD | ||
| 46 | __END__ |