Skip to content
This repository was archived by the owner on Jul 21, 2018. It is now read-only.

Commit d385fb8

Browse files
committed
renamed ID prefix in outhtml_codefold plug-in to be compatible with -a IDs
1 parent 42d7e36 commit d385fb8

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

ChangeLog

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
CHANGELOG Highlight
22

33

4-
25.11.2017
4+
27.11.2017
55

66
highlight 3.41
77

@@ -12,6 +12,7 @@ highlight 3.41
1212
-removed references to OutputType::HTML32
1313
-added extras/css-themes and extras/langDefs-resources
1414
(thanks to Tristano Ajmone)
15+
-renamed ID prefix in outhtml_codefold plug-in to be compatible with -a IDs
1516
-CLI: removed deprecated indicator of --data-dir option
1617
-CLI: added --no-version-info option
1718
-GUI: fixed initial theme selection

README_PLUGINS

+1-2
Original file line numberDiff line numberDiff line change
@@ -393,8 +393,7 @@ Features: Uses Decorate to add span tags with unique ids to opening and
393393

394394
outhtml_keyword_matcher.lua
395395
Description: Shows matching keywords in HTML output.
396-
Features: Uses Decorate to add span tags with unique ids to opening and
397-
closing brackets.
396+
Features: Uses Decorate to add span tags with unique ids to keywords.
398397
Uses OnStateChange to assign an internal ID to each keyword.
399398
Adds JavaScript with HeaderInjection variable.
400399
Inserts additional CSS styles with Injections variable.

plugins/outhtml_codefold.lua

+3-3
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function syntaxUpdate(desc)
3636
return
3737
end
3838
currentLineNumber = string.format("%d", lineNumber)
39-
return '<span id="l_'..currentLineNumber..'" class="hl fld">'
39+
return '<span id="x_'..currentLineNumber..'" class="hl fld">'
4040
end
4141

4242
function DecorateLineEnd(lineNumber)
@@ -138,7 +138,7 @@ function syntaxUpdate(desc)
138138
elem.title="Click to "+(isFolding? "unfold ": "fold ") + num + " line"+(num>1?"s":"");
139139
}
140140
function hlAddBtn(openId) {
141-
elem = document.getElementById('l_' + openId);
141+
elem = document.getElementById('x_' + openId);
142142
elem.className = "hl fld hl arrow_unfold";
143143
elem.addEventListener("click", make_handler(elem));
144144
hlAddTitle(elem, (endOfBlock[openId]-openId-1), false);
@@ -153,7 +153,7 @@ function syntaxUpdate(desc)
153153
for (var i=num+1; i<=endOfBlock[num]-1; i++){
154154
if (!foldedLines[i]) foldedLines[i] = 0 ;
155155
foldedLines[i] = foldedLines[i] + (isFolding ? 1:-1);
156-
elem = document.getElementById('l_'+i);
156+
elem = document.getElementById('x_'+i);
157157
if ( (isFolding || elem.style.display=='block')
158158
|| (!isFolding && foldedLines[i]>=1 && elem.className.indexOf ('_fold') < 0)
159159
|| (!isFolding && foldedLines[i]>=2 && elem.className.indexOf ('_fold') > 0)) {

0 commit comments

Comments
 (0)