summaryrefslogtreecommitdiff
path: root/buildscripts
diff options
context:
space:
mode:
authorxue <>2006-04-26 21:18:01 +0000
committerxue <>2006-04-26 21:18:01 +0000
commit8ab196ce6c2d5de323bdd8ebcc11a73814c0cdca (patch)
treee77b1306648d03920439290bb8f3e27821410804 /buildscripts
parent5ba6cd4be568f686d890835a77586077cde1a943 (diff)
Merge from 3.0 branch till 971.
Diffstat (limited to 'buildscripts')
-rw-r--r--buildscripts/jsbuilder/build.php2
-rw-r--r--buildscripts/texbuilder/build.php9
2 files changed, 8 insertions, 3 deletions
diff --git a/buildscripts/jsbuilder/build.php b/buildscripts/jsbuilder/build.php
index 910f0394..cc41c963 100644
--- a/buildscripts/jsbuilder/build.php
+++ b/buildscripts/jsbuilder/build.php
@@ -166,7 +166,7 @@ foreach($libraries as $libFile => $sourceFiles)
echo "Saving file {$libFile}\n";
$builds++;
}
-if(preg_match('/doc*/', $argv[1]))
+if(isset($argv[1]) && preg_match('/doc*/', $argv[1]))
{
$files = "";
foreach($libraries as $lib)
diff --git a/buildscripts/texbuilder/build.php b/buildscripts/texbuilder/build.php
index 4988bccd..4e2d8be6 100644
--- a/buildscripts/texbuilder/build.php
+++ b/buildscripts/texbuilder/build.php
@@ -155,7 +155,12 @@ function include_figure($info, $filename)
function anchor($matches)
{
$page = get_current_path();
- return '\hypertarget{'.$page.'/'.$matches[1].'}{}';
+ return '\hypertarget{'.$page.'/'.strtolower($matches[1]).'}{}';
+}
+
+function texttt($matches)
+{
+ return '\texttt{'.str_replace(array('#','_'),array('\#','\_'), $matches[1]).'}';
}
function get_current_path()
@@ -222,7 +227,7 @@ function parse_html($page,$html)
//text modifiers
$html = preg_replace('/<b>([^<]*)<\/b>/', '\textbf{$1}', $html);
$html = preg_replace('/<i>([^<]*)<\/i>/', '\emph{$1}', $html);
- $html = preg_replace('/<tt>([^<]*)<\/tt>/', '\texttt{$1}', $html);
+ $html = preg_replace_callback('/<tt>([^<]*)<\/tt>/', 'texttt', $html);
//links
$html = preg_replace_callback('/<a[^>]+href="([^"]*)"[^>]*>([^<]*)<\/a>/',