highlight: "display: block" and "line" only make sense in <pre> tags
authorJean Privat <jean@pryen.org>
Tue, 3 Jun 2014 13:05:21 +0000 (09:05 -0400)
committerJean Privat <jean@pryen.org>
Tue, 3 Jun 2014 13:05:21 +0000 (09:05 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

src/highlight.nit
src/nitlight.nit

index 5430321..fbe013e 100644 (file)
@@ -167,9 +167,9 @@ class HighlightVisitor
                return """
 .nitcode a { color: inherit; cursor:pointer; }
 .nitcode .popupable:hover { text-decoration: underline; cursor:help; } /* underline titles */
-.nitcode .foldable { display: block } /* for block productions*/
-.nitcode .line{ display: block } /* for lines */
-.nitcode .line:hover{ background-color: #FFFFE0; } /* current line */
+pre.nitcode .foldable { display: block } /* for block productions*/
+pre.nitcode .line{ display: block } /* for lines */
+pre.nitcode .line:hover{ background-color: #FFFFE0; } /* current line */
 .nitcode :target { background-color: #FFF3C2 } /* target highlight*/
 /* lexical raw tokens. independent of usage or semantic: */
 .nitcode .nc_c { color: gray; font-style: italic; } /* comment */
index b22e9f4..9112916 100644 (file)
@@ -72,7 +72,7 @@ for mm in mmodules do
                        page.add_raw_html """<link rel="stylesheet" type="text/css" href="style.css" />"""
                end
                page.add_raw_html """<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">\n"""
-               page.add_raw_html "</head><body><pre>"
+               page.add_raw_html "</head><body><pre class='nit_code'>"
        end
        v.enter_visit(m)
        if not opt_fragment.value then