summaryrefslogtreecommitdiff
path: root/buildscripts
diff options
context:
space:
mode:
authorxue <>2006-09-30 18:40:40 +0000
committerxue <>2006-09-30 18:40:40 +0000
commit1c32172efb18e8d08ea483e2460813670ebfe1a5 (patch)
tree8420f9e53eaba35d7b4822fac823197254f0d131 /buildscripts
parent6b1d87352911e43672b46b7a65a3c90dd8e5b8b1 (diff)
merge from 3.0 branch till 1451.
Diffstat (limited to 'buildscripts')
-rw-r--r--buildscripts/texbuilder/Page2Tex.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/buildscripts/texbuilder/Page2Tex.php b/buildscripts/texbuilder/Page2Tex.php
index feda4873..912fb82a 100644
--- a/buildscripts/texbuilder/Page2Tex.php
+++ b/buildscripts/texbuilder/Page2Tex.php
@@ -7,8 +7,8 @@ class Page2Tex
private $_base;
private $_dir;
- private $_verb_find = array('\$','\%', '\{', '\}', "\t",'``');
- private $_verb_replace = array('$', '%', '{','}', " ",'"');
+ private $_verb_find = array('\$','\%', '\{', '\}', "\t",'``','`');
+ private $_verb_replace = array('$', '%', '{','}', " ",'"','\'');
function __construct($base, $dir, $current='')
{
@@ -87,7 +87,7 @@ class Page2Tex
function texttt($matches)
{
- return '\texttt{'.str_replace(array('#','_'),array('\#','\_'), $matches[1]).'}';
+ return '\texttt{'.str_replace(array('#','_','&amp;'),array('\#','\_','\&'), $matches[1]).'}';
}
function get_current_path()
@@ -130,6 +130,7 @@ class Page2Tex
$html = preg_replace('/<\/?p>/', '', $html);
$html = preg_replace('/(\s+|\(+|\[+)"/', '$1``', $html);
+ $html = preg_replace('/(\s+|\(+|\[+)\'/', '$1`', $html);
//escape { and }
$html = preg_replace('/([^\s]+){([^}]*)}([^\s]+)/', '$1\\\{$2\\\}$3', $html);
@@ -286,4 +287,4 @@ class Page2Tex
}
-?> \ No newline at end of file
+?>