summaryrefslogtreecommitdiffstats
path: root/gerrit-prettify
diff options
context:
space:
mode:
authorShawn O. Pearce <sop@google.com>2010-03-01 11:26:40 -0800
committerShawn O. Pearce <sop@google.com>2010-03-01 12:35:17 -0800
commitc2f7f3e58a18927bb762acab99d8db3beca0d2ee (patch)
treeb1308dc46555e94c465e39400d8d0c8f2305117d /gerrit-prettify
parent825c10d014c19240997de30d6551ff39b795caef (diff)
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>
Diffstat (limited to 'gerrit-prettify')
-rw-r--r--gerrit-prettify/src/main/java/com/google/gerrit/prettify/common/PrettyFormatter.java2
-rw-r--r--gerrit-prettify/src/main/resources/com/google/gerrit/prettify/client/gerrit.css5
2 files changed, 5 insertions, 2 deletions
diff --git a/gerrit-prettify/src/main/java/com/google/gerrit/prettify/common/PrettyFormatter.java b/gerrit-prettify/src/main/java/com/google/gerrit/prettify/common/PrettyFormatter.java
index 0d6d72c22f..e862e66422 100644
--- a/gerrit-prettify/src/main/java/com/google/gerrit/prettify/common/PrettyFormatter.java
+++ b/gerrit-prettify/src/main/java/com/google/gerrit/prettify/common/PrettyFormatter.java
@@ -326,7 +326,7 @@ public abstract class PrettyFormatter implements SparseHtmlFile {
if (settings.isShowTabs()) {
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();
diff --git a/gerrit-prettify/src/main/resources/com/google/gerrit/prettify/client/gerrit.css b/gerrit-prettify/src/main/resources/com/google/gerrit/prettify/client/gerrit.css
index 26d095c7d4..86f53d69ed 100644
--- a/gerrit-prettify/src/main/resources/com/google/gerrit/prettify/client/gerrit.css
+++ b/gerrit-prettify/src/main/resources/com/google/gerrit/prettify/client/gerrit.css
@@ -17,6 +17,7 @@
@external .vt;
@external .wdd;
@external .wdi;
+@external .pun;
.wse {
background: red;
@@ -38,7 +39,9 @@
* so we have to override the contained style.
*/
.wse .vt,
-.wdd .vt {
+.wdd .vt,
+.wse .vt .pun,
+.wdd .vt .pun {
color: black;
}
.wse .wdd {