* Use <span> for the highlights
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33859 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -42,13 +42,13 @@ def renderHtml(text, highlights, sourceFileName, outputFileName):
|
|||||||
count = 0
|
count = 0
|
||||||
for slice in splittedText:
|
for slice in splittedText:
|
||||||
if count % 2 == 0:
|
if count % 2 == 0:
|
||||||
temp += escape(slice) + '<highlight class="tooltip">'
|
temp += escape(slice) + '<span class="highlight tooltip">'
|
||||||
else:
|
else:
|
||||||
temp += escape(slice) + "<em>" + highlights[(count - 1) / 2][2] \
|
temp += escape(slice) + "<em>" + highlights[(count - 1) / 2][2] \
|
||||||
+ "</em></highlight>"
|
+ "</em></span>"
|
||||||
count += 1
|
count += 1
|
||||||
|
|
||||||
temp += "</highlight>" # close the superfluous last highlight
|
temp += "</span>" # close the superfluous last highlight
|
||||||
|
|
||||||
count = 1
|
count = 1
|
||||||
for line in temp.split('\n'):
|
for line in temp.split('\n'):
|
||||||
@@ -131,7 +131,7 @@ def checkHighlights(highlights):
|
|||||||
|
|
||||||
def cssStyle():
|
def cssStyle():
|
||||||
return """
|
return """
|
||||||
highlight {
|
.highlight {
|
||||||
background: #ffff00;
|
background: #ffff00;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
}
|
}
|
||||||
@@ -140,18 +140,18 @@ def cssStyle():
|
|||||||
font-family: monospace;
|
font-family: monospace;
|
||||||
}
|
}
|
||||||
|
|
||||||
highlight.tooltip em {
|
.tooltip em {
|
||||||
display:none;
|
display:none;
|
||||||
}
|
}
|
||||||
|
|
||||||
highlight.tooltip:hover {
|
.tooltip:hover {
|
||||||
border: 0;
|
border: 0;
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 500;
|
z-index: 500;
|
||||||
text-decoration:none;
|
text-decoration:none;
|
||||||
}
|
}
|
||||||
|
|
||||||
highlight.tooltip:hover em {
|
.tooltip:hover em {
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
display: block;
|
display: block;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|||||||
Reference in New Issue
Block a user