diff options
| author | David Aspinall | 2002-08-15 22:06:24 +0000 |
|---|---|---|
| committer | David Aspinall | 2002-08-15 22:06:24 +0000 |
| commit | 57cd4fcfee3b066412697bcbb4e2bd7fafa8ca30 (patch) | |
| tree | 16d4b02f52dd8e6981c88523d4192d7798e6d195 | |
| parent | ca4c1a91f089988737d3f57f5378eedea1627ba1 (diff) | |
Play with markup.
| -rw-r--r-- | html/elispmarkup.php3 | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/html/elispmarkup.php3 b/html/elispmarkup.php3 index 2e21180c..f8602af1 100644 --- a/html/elispmarkup.php3 +++ b/html/elispmarkup.php3 @@ -114,19 +114,21 @@ function elisp_markup($filename,$thispage,$title="") { $line = $file[$i]; // HTML escapes $line = htmlentities($line); + // Pagebreaks + // ??? // Anchors for URLs $line = ereg_replace("((http://|mailto:)[-a-zA-Z0-9\.~/_@]+)","<a href=\"\\1\">\\1</a>",$line); // Font-lock equivalents... // 1. comments. Strings roughly done: ignore if quote appears after ; -// seems buggy. -// $line = ereg_replace("^([^;]*)(\;+[^\"]+)$", -// "\\1<div style=\"color: #8080E0\">\\2</div>", -// $line); +// seems buggy: <div> breaks line in pre formatting. Only do for whole-lines. +// $line = ereg_replace("^([^;]*)(;+[^\"^\n]+)\n$", + $line = ereg_replace("^(;+[^\"^\n]+)\n$", + "<font color=\"#8080E0\">\\1</font>\n", + $line); // 2. keywords - // FIXME: this inserts CR's. -// $line = ereg_replace("^\(def(macro|un|var|custom|const|group)", -// "(<div style=\"color: #C0B0B0\">def\\1</div>", -// $line); + $line = ereg_replace("^\(def(macro|un|var|custom|const|group|face)", + "(<font color=\"#F0B0B0\">def\\1</font>", + $line); // FIXME: add hrefs for keywords, looking up in TAGS file. // FIXME: add line numbers // FIXME: parse strings |
