private void handleStringLiterals(String text, int textStartPosition) { Matcher matcher = STRING_LITERAL_PATTERN.matcher(text); while (matcher.find()) { int startPosition = textStartPosition + matcher.start(); int startIndex = this.ctm.findIndex(startPosition, -1, false); int endPosition = textStartPosition + matcher.end() - 1; int endIndex = this.ctm.findIndex(endPosition, -1, false); if (startIndex != endIndex) { startIndex = tokenStartingAt(startPosition); endIndex = tokenEndingAt(endPosition); disableFormatting(startIndex, endIndex); } noSubstituteWrapping(startPosition, endPosition); } }
private void handleStringLiterals(String text, int textStartPosition) { Matcher matcher = STRING_LITERAL_PATTERN.matcher(text); while (matcher.find()) { int startPosition = textStartPosition + matcher.start(); int startIndex = this.ctm.findIndex(startPosition, -1, false); int endPosition = textStartPosition + matcher.end() - 1; int endIndex = this.ctm.findIndex(endPosition, -1, false); if (startIndex != endIndex) { startIndex = tokenStartingAt(startPosition); endIndex = tokenEndingAt(endPosition); disableFormatting(startIndex, endIndex); } noSubstituteWrapping(startPosition, endPosition); } }
private void handleStringLiterals(String text, int textStartPosition) { Matcher matcher = STRING_LITERAL_PATTERN.matcher(text); while (matcher.find()) { int startPosition = textStartPosition + matcher.start(); int startIndex = this.ctm.findIndex(startPosition, -1, false); int endPosition = textStartPosition + matcher.end() - 1; int endIndex = this.ctm.findIndex(endPosition, -1, false); if (startIndex != endIndex) { startIndex = tokenStartingAt(startPosition); endIndex = tokenEndingAt(endPosition); disableFormatting(startIndex, endIndex); } noSubstituteWrapping(startPosition, endPosition); } }
private void handleNoFormatTag(int start, int end, boolean isOpeningTag) { if (isOpeningTag) { if (this.noFormatTagOpenStart < 0) this.noFormatTagOpenStart = start; } else if (this.noFormatTagOpenStart >= 0) { int openingTagIndex = tokenStartingAt(this.noFormatTagOpenStart); int closingTagIndex = tokenEndingAt(end); if (openingTagIndex < closingTagIndex) { disableFormatting(openingTagIndex, closingTagIndex); closingTagIndex = tokenEndingAt(end); } cleanupHTMLElement(openingTagIndex, closingTagIndex, false); this.noFormatTagOpenStart = -1; } }
private void handleNoFormatTag(int start, int end, boolean isOpeningTag) { if (isOpeningTag) { if (this.noFormatTagOpenStart < 0) this.noFormatTagOpenStart = start; } else if (this.noFormatTagOpenStart >= 0) { int openingTagIndex = tokenStartingAt(this.noFormatTagOpenStart); int closingTagIndex = tokenEndingAt(end); if (openingTagIndex < closingTagIndex) { disableFormatting(openingTagIndex, closingTagIndex); closingTagIndex = tokenEndingAt(end); } cleanupHTMLElement(openingTagIndex, closingTagIndex, false); this.noFormatTagOpenStart = -1; } }
private void handleNoFormatTag(int start, int end, boolean isOpeningTag) { if (isOpeningTag) { if (this.noFormatTagOpenStart < 0) this.noFormatTagOpenStart = start; } else if (this.noFormatTagOpenStart >= 0) { int openingTagIndex = tokenStartingAt(this.noFormatTagOpenStart); int closingTagIndex = tokenEndingAt(end); if (openingTagIndex < closingTagIndex) { disableFormatting(openingTagIndex, closingTagIndex); closingTagIndex = tokenEndingAt(end); } cleanupHTMLElement(openingTagIndex, closingTagIndex, false); this.noFormatTagOpenStart = -1; } }
disableFormatting(startIndex, endIndex);
disableFormatting(startIndex, endIndex);
disableFormatting(startIndex, endIndex);