PPI-HTML-CodeFolder
view release on metacpan or search on metacpan
lib/PPI/HTML/CodeFolder.pm view on Meta::CPAN
operator op
pod pd
pragma pg
prototype pt
readline rl
regex re
regexp re
separator sp
single sg
structure st
substitute su
symbol sy
transliterate tl
word wo
words wd
);
#
# fold section regular expressions
#
my %foldres = (
Whitespace => [
qr/\G(?<=<pre>)((?:\s*<br>)+)/,
qr/\G.*?<br>((?:\s*<br>)+)/
],
Comments => [
qr/\G(?<=<pre>)\s*(<span\s+class=['"]comment['"]>.+?<\/span>)(?=<br>)/,
qr/\G.*?<br>\s*(<span\s+class=['"]comment['"]>.+?<\/span>)(?=<br>)/
],
POD => [
qr/\G(?<=<pre>)\s*(<span\s+class=['"]pod['"]>.+?<\/span>)(?=<br>)/,
qr/\G.*?<br>\s*(<span\s+class=['"]pod['"]>.+?<\/span>)(?=<br>)/
],
Heredocs => [
qr/\G(?<=<pre>)\s*(<span\s+class=['"]heredoc_content['"]>.+?<\/span>)(?=<br>)/,
qr/\G.*?<br>\s*(<span\s+class=['"]heredoc_content['"]>.+?<\/span>)(?=<br>)/
],
Imports => [
qr/\G(?<=<pre>)\s*
(
(?:<span\s+class=['"]keyword['"]>(?:use|require)<\/span>.+?;\s*)+
(?:<span\s+class=['"]comment['"]>.+?<\/span>)?
)
(?=<br>)
/x,
qr/\G.*?<br>\s*
(
(?:<span\s+class=['"]keyword['"]>(?:use|require)<\/span>.+?;\s*)+
(?:<span\s+class=['"]comment['"]>.+?<\/span>)?
)
(?=<br>)
/x
],
);
#
# folddiv CSS
#
our $ftcss = <<'EOFTCSS';
.popupdiv {
font-family: fixed, Courier;
font-size: 8pt;
font-style: normal;
/* lineheight: 10pt; */
border:solid 1px #666666;
padding:4px;
position:absolute;
z-index:100;
visibility: hidden;
color: black;
top:10px;
left:20px;
width:auto;
height:auto;
background-color:#ffffcc;
layer-background-color:#ffffcc;
/* opacity: .9;
filter: alpha(opacity=90); */
overflow : hidden; // to keep FF on OS X happy
}
.folddiv {
position: absolute;
visibility: hidden;
overflow : hidden; // to keep FF on OS X happy
}
.bodypre {
font-family: fixed, Courier;
font-size: 9pt;
line-height: 13pt;
text-align: left;
color: black;
}
.lnpre {
font-family: fixed, Courier;
font-size: 9pt;
line-height: 13pt;
text-align: right;
color: #666666;
}
.foldfill {
font-family: fixed, Courier;
font-size: 8pt;
font-style: italic;
line-height: 13pt;
color: blue;
}
.foldbtn {
font-family: fixed, Courier;
font-size: 9pt;
line-height: 13pt;
color: blue;
}
-->
</style>
( run in 3.139 seconds using v1.01-cache-2.11-cpan-364913b4093 )