Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/keenquotes.git

Move EOP into leading quote opening single list

Author Dave Jarvis <email>
Date 2021-06-08 21:16:33 GMT-0700
Commit 4f85bab7d9b1efb340a2dd1761215e59a0fa51fa
Parent ca8bd10
Delta 4 lines added, 4 lines removed
lib/src/main/java/com/keenwrite/quotes/Parser.java
*/
private static final LexemeType[] LEADING_QUOTE_OPENING_SINGLE =
- new LexemeType[]{SPACE, HYPHEN, QUOTE_DOUBLE, OPENING_GROUP};
+ new LexemeType[]{SPACE, HYPHEN, QUOTE_DOUBLE, OPENING_GROUP, EOP};
/**
* Single quotes succeeded by these {@link LexemeType}s may be opening quotes.
*/
private static final LexemeType[] LAGGING_QUOTE_OPENING_SINGLE =
- new LexemeType[]{WORD, ELLIPSIS, QUOTE_SINGLE, QUOTE_DOUBLE, EOP};
+ new LexemeType[]{WORD, ELLIPSIS, QUOTE_SINGLE, QUOTE_DOUBLE};
/**
lib/src/test/resources/com/keenwrite/quotes/smartypants.txt
Model "T2000"
-The 2's complement.\n\n"Yar, binary!"
-The 2&apos;s complement.\n\n&ldquo;Yar, binary!&rdquo;
+The 2's complement.\n\n'Yar, binary!'
+The 2&apos;s complement.\n\n&lsquo;Yar, binary!&rsquo;
'Oak,' 'elm,' and 'beech' are names of trees. So is 'pine.'