X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=funcsummary.php;h=4a7c1ddc6dc96a9bd926daad0fc3b4ac7cf3f134;hp=f8a96cf230ea784c0b42b1dc05a21f90760558a2;hb=b63e146a77c6512cae1574c0bb520b3a7bbec1e7;hpb=336ab37eb6fa1e0e91857d65fae0e747b4ad481c
diff --git a/funcsummary.php b/funcsummary.php
index f8a96cf..4a7c1dd 100644
--- a/funcsummary.php
+++ b/funcsummary.php
@@ -14,11 +14,18 @@ function ff($t)
{
$t = preg_replace('/^ \* /m', '', trim($t, "*/ \n"));
$t = preg_replace_callback('/(\<\?php.*?\?\>)/s', 'hl', $t);
- $t = nl2br(preg_replace('/\n *\* */', "\n", $t));
+ $t = str_replace("
\n
\n", "
", nl2br(preg_replace('/\n *\* */', "\n", $t)));
$t = preg_replace('/(\
\n)+\
(\
\n)+/', '', $t); $t = preg_replace('/(\
\n)+\<\/pre\>(\
\n)+/', '', $t); + $t = str_replace("
\n", "", $t); return sprintf('%s
', ltrim($t, ' *')); } +function e($s) +{ + $a = func_get_args(); + array_unshift($a, STDERR); + call_user_func_array('fprintf', $a); +} $preface = <<<_PREFACE @@ -29,13 +36,20 @@ $preface = <<<_PREFACE font-size: 80%%; font-family: sans-serif; } - h2 { + h2, h3 { color: #339; clear: both; font-size: 1.2em; background: #ffc; padding: .2em; } + h2.o { + color: #66b; + clear: both; + font-size: 1.3em; + background: #f0f0f0; + padding: .2em; + } p { margin-left: 1em; } @@ -53,6 +67,9 @@ $preface = <<<_PREFACE width: auto; float: left; } + p, pre { + clear: both; + } p br, pre code br { display: block; } @@ -65,6 +82,7 @@ $footer = <<<_FOOTERGenerated at: %s