// Some of these are actually APOSTROPHE's and should not be paired
offset = t->start;
- if (!((offset == 0) || (char_is_whitespace_or_line_ending_or_punctuation(str[offset - 1])) ||
+ if (!((offset == 0) ||
+ (char_is_whitespace_or_line_ending_or_punctuation(str[offset - 1])) ||
(char_is_whitespace_or_line_ending_or_punctuation(str[offset + 1])))) {
t->type = APOSTROPHE;
break;
if (offset && (char_is_punctuation(str[offset - 1])) &&
(char_is_alphanumeric(str[offset + 1]))) {
- t->type = APOSTROPHE;
- break;
+ // If possessive apostrophe, e.g. `x`'s
+ if (str[offset + 1] == 's' || str[offset + 1] == 'S') {
+ if (char_is_whitespace_or_line_ending_or_punctuation(str[offset + 2])) {
+ t->type = APOSTROPHE;
+ break;
+ }
+ }
}
case QUOTE_DOUBLE:
offset = t->start;
<text:p text:style-name="Standard">foo’s and bar’s</text:p>
<text:p text:style-name="Standard"><text:span text:style-name="Source_20_Text">foo</text:span>’s and <text:span text:style-name="Source_20_Text">bar</text:span>’s</text:p>
+
+<text:p text:style-name="Standard">30</text:p>
+
+<text:p text:style-name="Standard">foo(‘bar’)</text:p>
+
+<text:p text:style-name="Standard">foo(“bar”)</text:p>
</office:text>
</office:body>
</office:document>