line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Text::Typography; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
30647
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
35
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
5
|
use Exporter 'import'; |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
35
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
5
|
use vars qw($VERSION @EXPORT_OK); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
4495
|
|
9
|
|
|
|
|
|
|
$VERSION = '0.01'; |
10
|
|
|
|
|
|
|
@EXPORT_OK = qw(typography); |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head1 NAME |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
Text::Typography - Markup ASCII text with correct typography for HTML |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=head1 SYNOPSIS |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
use Text::Typography qw(typography); |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
print typography($text); |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head1 DESCRIPTION |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
This module is a thin wrapper for John Gruber's SmartyPants plugin for various |
25
|
|
|
|
|
|
|
CMSs. |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
SmartyPants is a web publishing utility that translates plain ASCII |
28
|
|
|
|
|
|
|
punctuation characters into "smart" typographic punctuation HTML |
29
|
|
|
|
|
|
|
entities. SmartyPants can perform the following transformations: |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=over 4 |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=item * |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
Straight quotes ( " and ' ) into "curly" quote HTML entities |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=item * |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
Backticks-style quotes (``like this'') into "curly" quote HTML entities |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=item * |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
Dashes (C<--> and C<--->) into en- and em-dash entities |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=item * |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
Three consecutive dots (C<...>) into an ellipsis entity |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=back |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
SmartyPants does not modify characters within C<< >>, C<< >>, |
52
|
|
|
|
|
|
|
C<< >>, C<< |