Commit d385fb85 authored by André Simon's avatar André Simon

renamed ID prefix in outhtml_codefold plug-in to be compatible with -a IDs

parent 42d7e360
CHANGELOG Highlight
25.11.2017
27.11.2017
highlight 3.41
......@@ -12,6 +12,7 @@ highlight 3.41
-removed references to OutputType::HTML32
-added extras/css-themes and extras/langDefs-resources
(thanks to Tristano Ajmone)
-renamed ID prefix in outhtml_codefold plug-in to be compatible with -a IDs
-CLI: removed deprecated indicator of --data-dir option
-CLI: added --no-version-info option
-GUI: fixed initial theme selection
......
......@@ -393,8 +393,7 @@ Features: Uses Decorate to add span tags with unique ids to opening and
outhtml_keyword_matcher.lua
Description: Shows matching keywords in HTML output.
Features: Uses Decorate to add span tags with unique ids to opening and
closing brackets.
Features: Uses Decorate to add span tags with unique ids to keywords.
Uses OnStateChange to assign an internal ID to each keyword.
Adds JavaScript with HeaderInjection variable.
Inserts additional CSS styles with Injections variable.
......
......@@ -36,7 +36,7 @@ function syntaxUpdate(desc)
return
end
currentLineNumber = string.format("%d", lineNumber)
return '<span id="l_'..currentLineNumber..'" class="hl fld">'
return '<span id="x_'..currentLineNumber..'" class="hl fld">'
end
function DecorateLineEnd(lineNumber)
......@@ -138,7 +138,7 @@ function syntaxUpdate(desc)
elem.title="Click to "+(isFolding? "unfold ": "fold ") + num + " line"+(num>1?"s":"");
}
function hlAddBtn(openId) {
elem = document.getElementById('l_' + openId);
elem = document.getElementById('x_' + openId);
elem.className = "hl fld hl arrow_unfold";
elem.addEventListener("click", make_handler(elem));
hlAddTitle(elem, (endOfBlock[openId]-openId-1), false);
......@@ -153,7 +153,7 @@ function syntaxUpdate(desc)
for (var i=num+1; i<=endOfBlock[num]-1; i++){
if (!foldedLines[i]) foldedLines[i] = 0 ;
foldedLines[i] = foldedLines[i] + (isFolding ? 1:-1);
elem = document.getElementById('l_'+i);
elem = document.getElementById('x_'+i);
if ( (isFolding || elem.style.display=='block')
|| (!isFolding && foldedLines[i]>=1 && elem.className.indexOf ('_fold') < 0)
|| (!isFolding && foldedLines[i]>=2 && elem.className.indexOf ('_fold') > 0)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment