File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -141,14 +141,17 @@ export class Parser {
141
141
}
142
142
143
143
/**
144
- * If this text must end on space, then it must not endOnQuote (implies that the space is part of the entire text)
145
- * When we encounter a space, then we must split the current token into 2 tokens and only consume the first half
144
+ * SPECIAL CASE:
145
+ * If we encounter a space, then we must split the current token into 2 tokens and only consume the first part
146
146
*
147
- * <a b> -> <a>< b>
148
- * | | |
149
- * | | idx (new)
150
- * | |
151
- * idx (consumed)
147
+ * a b -> a b
148
+ * | | |
149
+ * | | idx (new)
150
+ * | |
151
+ * idx consumed
152
+ *
153
+ * Note: We only handle endOnSpace special case when we don't expect the current text to endOnQuotes
154
+ * If it endOnQuotes, then it implies that it opened with quotes (and thus we need an enclosing/matching quote)
152
155
*/
153
156
if ( endOnSpace && ! endOnQuotes ) {
154
157
const origStr = stringifyTokens ( ogText , [ tokens [ idx ] ] )
You can’t perform that action at this time.
0 commit comments