Skip to content

Commit

Permalink
fix comments giving wrong semantics
Browse files Browse the repository at this point in the history
  • Loading branch information
Casheeew committed Dec 17, 2023
1 parent a19b2ad commit 430d706
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ext/js/dom/document-util.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export class DocumentUtil {
if (quoteStack.length === 0) {
let terminatorInfo = terminatorMap.get(c);
if (typeof terminatorInfo !== 'undefined') {
// Include the previous character if it is a terminator character and is included at start.
// Include the previous character while it is a terminator character and is included at start.
while (typeof terminatorInfo !== 'undefined' && terminatorInfo[0] && cursor.start > 0) {
--cursor.start;
if (cursor.start === 0) { break; }
Expand All @@ -148,7 +148,7 @@ export class DocumentUtil {
let quoteInfo = forwardQuoteMap.get(c);
if (typeof quoteInfo !== 'undefined') {
if (quoteStack.length === 0) {
// Include the previous character if it is a quote character and is included at start.
// Include the previous character while it is a quote character and is included at start.
while (typeof quoteInfo !== 'undefined' && quoteInfo[1] && cursor.start > 0) {
--cursor.start;
if (cursor.start === 0) { break; }
Expand Down Expand Up @@ -178,7 +178,7 @@ export class DocumentUtil {
if (quoteStack.length === 0) {
let terminatorInfo = terminatorMap.get(c);
if (typeof terminatorInfo !== 'undefined') {
// Include the following character if it is a terminator character and is included at end.
// Include the following character while it is a terminator character and is included at end.
while (typeof terminatorInfo !== 'undefined' && terminatorInfo[1] && cursor.end < textLength) {
++cursor.end;
if (cursor.end === textLength) { break; }
Expand All @@ -192,7 +192,7 @@ export class DocumentUtil {
let quoteInfo = backwardQuoteMap.get(c);
if (typeof quoteInfo !== 'undefined') {
if (quoteStack.length === 0) {
// Include the following character if it is a quote character and is included at end.
// Include the following character while it is a quote character and is included at end.
while (typeof quoteInfo !== 'undefined' && quoteInfo[1] && cursor.end < textLength) {
++cursor.end;
if (cursor.end === textLength) { break; }
Expand Down

0 comments on commit 430d706

Please sign in to comment.