File tree Expand file tree Collapse file tree 3 files changed +14
-14
lines changed Expand file tree Collapse file tree 3 files changed +14
-14
lines changed Original file line number Diff line number Diff line change 7777 $ page =markhtml ($ page );
7878 ?>
7979
80- <?php echo "<link rel= \"stylesheet \" href= \"double_main.css \" type= \"text/css \" /> " ; ?>
8180
8281 </head>
8382 <body>
Original file line number Diff line number Diff line change 22require_once ('markdown_extended.php ' );
33
44function 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?>
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments