Skip to content

Commit e5dfa6a

Browse files
author
kern
committed
Fix possible lock-up because of endless loop during rendering
1 parent 10d52ad commit e5dfa6a

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

CHANGELOG.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
= Changelog of Brackets AsciiDoc Preview
33
:experimental:
44

5+
== Version 1.2.3
6+
7+
* Fix possible lock-up because of endless loop during rendering.
8+
59
== Version 1.2.2
610

711
* Improved mapping of preview location to source line numbers and vice versa.

main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ define(function (require, exports, module) {
410410
do {
411411
line--;
412412
$elem = doc.find('[class~=data-line-' + line + ']');
413-
} while ($elem.length === 0);
413+
} while (line >= 0 && $elem.length === 0);
414414

415415
var blockPos = $elem.position();
416416
if (blockPos !== undefined) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"title": "AsciiDoc Preview",
44
"description": "Live preview for AsciiDoc documents.",
55
"homepage": "https://github.com/asciidoctor/brackets-asciidoc-preview",
6-
"version": "1.2.2",
6+
"version": "1.2.3",
77
"author": "Thomas Kern (https://github.com/nerk)",
88
"license": "MIT",
99
"engines": {

0 commit comments

Comments
 (0)