This commit is contained in:
Millesimus 2021-12-11 15:53:53 +01:00 committed by Daniel Gultsch
parent 364ef2543d
commit 2553895300

View file

@ -30,14 +30,18 @@ public class QuoteHelper {
} }
public static boolean isPositionAltQuoteStart(CharSequence body, int pos) { public static boolean isPositionAltQuoteStart(CharSequence body, int pos) {
return isPositionAltQuoteCharacter(body, pos) && !isPositionFollowedByAltQuoteEnd(body, pos); return isPositionAltQuoteCharacter(body, pos)
&& isPositionPrecededByPreQuote(body, pos)
&& !isPositionFollowedByAltQuoteEnd(body, pos);
} }
public static boolean isPositionFollowedByQuoteChar(CharSequence body, int pos) { public static boolean isPositionFollowedByQuoteChar(CharSequence body, int pos) {
return body.length() > pos + 1 && isPositionQuoteCharacter(body, pos + 1); return body.length() > pos + 1 && isPositionQuoteCharacter(body, pos + 1);
} }
// 'Prequote' means anything we require or can accept in front of a QuoteChar /**
* 'Prequote' means anything we require or can accept in front of a QuoteChar.
*/
public static boolean isPositionPrecededByPreQuote(CharSequence body, int pos) { public static boolean isPositionPrecededByPreQuote(CharSequence body, int pos) {
return UIHelper.isPositionPrecededByLineStart(body, pos); return UIHelper.isPositionPrecededByLineStart(body, pos);
} }