Skip to content

Commit 994073e

Browse files
committed
Update auto
1 parent 91af256 commit 994073e

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

index.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@
7777
$page=markhtml($page);
7878
?>
7979

80-
<?php echo "<link rel=\"stylesheet\" href=\"double_main.css\" type=\"text/css\" />"; ?>
8180

8281
</head>
8382
<body>

markhtml/markhtml.php

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,27 @@
22
require_once('markdown_extended.php');
33

44
function markhtml($mark){
5-
$html=MarkdownExtended($mark);
6-
//katex_start();
7-
$ktx="";
85
$res="";
9-
for($i=0;$i<strlen($html);$i++){
10-
if($html[$i]=='$'){
11-
for($j=$i+1;$j<strlen($html);$j++){
12-
if($html[$j]=='$')break;
13-
$ktx[$j]=$html[$j];
6+
$ktx="";
7+
$code=1;
8+
for($i=0;$i<strlen($mark);$i++){
9+
if($mark[$i]=='$' && $code==1){
10+
for($j=$i+1;$j<strlen($mark);$j++){
11+
if($mark[$j]=='$')break;
12+
$ktx[$j-$i]=$mark[$j];
1413
}
1514
$res=$res.katex($ktx);
1615
$ktx="";
1716
$i=$j;
1817
continue;
1918
}
20-
$res=$res.$html[$i];
19+
if($mark[$i]=='`'){
20+
if($code==1)$code=0;
21+
else $code=1;
22+
}
23+
$res=$res.$mark[$i];
2124
}
22-
return $res;
25+
$html=MarkdownExtended($res);
26+
return $html;
2327
}
2428
?>

name.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)