Adding more logs at the start of the script to help the debug
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1286 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
13
markdown.php
13
markdown.php
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
function debugMKD ($msg)
|
function debugMKD ($msg)
|
||||||
{
|
{
|
||||||
return;
|
//return;
|
||||||
$trace = debug_backtrace();
|
$trace = debug_backtrace();
|
||||||
$back = reset ($trace);
|
$back = reset ($trace);
|
||||||
file_put_contents ("/tmp/debug", "[".$back["line"]."] $msg\n", FILE_APPEND);
|
file_put_contents ("/tmp/debug", "[".$back["line"]."] $msg\n", FILE_APPEND);
|
||||||
@@ -158,6 +158,8 @@ $timeStart = microtime (TRUE);
|
|||||||
|
|
||||||
$indent = strspn ($line, " ");
|
$indent = strspn ($line, " ");
|
||||||
debugMKD ("DEBUT: Indent='$indent'");
|
debugMKD ("DEBUT: Indent='$indent'");
|
||||||
|
debugMKD ("DEBUT: indentStack=".print_r ($indentStack, TRUE));
|
||||||
|
debugMKD ("DEBUT: typeStack=".print_r ($typeStack, TRUE));
|
||||||
|
|
||||||
// Spacing
|
// Spacing
|
||||||
if ($indent < end ($indentStack))
|
if ($indent < end ($indentStack))
|
||||||
@@ -294,6 +296,15 @@ $timeStart = microtime (TRUE);
|
|||||||
array_pop ($htmlStack);
|
array_pop ($htmlStack);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// New paragraphs
|
||||||
|
/* if ($type === "p")
|
||||||
|
{
|
||||||
|
debugMKD ("DEB1 : Starting a new paragraph");
|
||||||
|
debugMKD (str_repeat (" ", $indent)."<$type>");
|
||||||
|
$res .= "\n".str_repeat (" ", $indent)."<$type>";
|
||||||
|
array_push ($typeStack, $type);
|
||||||
|
}*/
|
||||||
|
|
||||||
// If code, there is no emphasis, email, and other convertions
|
// If code, there is no emphasis, email, and other convertions
|
||||||
if ($type !== "code")
|
if ($type !== "code")
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user