Fix tab marker RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK

Inserting the HTML entity confused the prettify engine when we were
running in debug hosted mode.  Instead of the Unicode character we
expected, we got an ASCII "W".

Use the actual character in the source code rather than the entity,
this should reduce the risk that the prettify engine or the browser
will become confused and misrender it.

Also correct the coloring, now that its a real character prettify is
converting it into a class named 'pun', which is contained within
the 'vt' class we created.  But if syntax highlighting is off that
'pun' class doesn't exist, so we need CSS selectors for both cases.

Change-Id: I8ac03bf00cd4493ea53dcf3573cc2ba92455dfbf
Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
Shawn O. Pearce
2010-03-01 11:26:40 -08:00
parent 825c10d014
commit c2f7f3e58a
2 changed files with 5 additions and 2 deletions

View File

@@ -326,7 +326,7 @@ public abstract class PrettyFormatter implements SparseHtmlFile {
if (settings.isShowTabs()) { if (settings.isShowTabs()) {
String t = 1 < settings.getTabSize() ? "\t" : ""; String t = 1 < settings.getTabSize() ? "\t" : "";
html = html.replaceAll("\t", "<span class=\"vt\">&#187;</span>" + t); html = html.replaceAll("\t", "<span class=\"vt\">\u00BB</span>" + t);
} }
return html.asString(); return html.asString();

View File

@@ -17,6 +17,7 @@
@external .vt; @external .vt;
@external .wdd; @external .wdd;
@external .wdi; @external .wdi;
@external .pun;
.wse { .wse {
background: red; background: red;
@@ -38,7 +39,9 @@
* so we have to override the contained style. * so we have to override the contained style.
*/ */
.wse .vt, .wse .vt,
.wdd .vt { .wdd .vt,
.wse .vt .pun,
.wdd .vt .pun {
color: black; color: black;
} }
.wse .wdd { .wse .wdd {