Skip to content

Fix smart double quote closing before adjacent text - #89

Merged
Princesseuh merged 2 commits into
bruits:mainfrom
HiDeoo:hd/fix-smart-double-quotes-adjacent-text
Jun 11, 2026
Merged

Princesseuh merged 2 commits into
bruits:mainfrom
HiDeoo:hd/fix-smart-double-quotes-adjacent-text

Conversation

@HiDeoo

@HiDeoo HiDeoo commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Description

This PR fixes a smart punctuation issue and ensure a trailing double quote is rendered as a closing quote when text follows the quoted text without whitespace.

For example, considering the sentence "About Me"로, before this PR, the output would be “About Me“로 instead of “About Me”로.

Note that I'm not quite sure I selected all the proper packages when running pnpx sampo add. Please let me know if I missed any or some may not be relevant to this change.

@codspeed

codspeed Bot commented Jun 11, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 27 untouched benchmarks


Comparing HiDeoo:hd/fix-smart-double-quotes-adjacent-text (df392a5) with main (a8f5531)

Open in CodSpeed

@HiDeoo HiDeoo mentioned this pull request Jun 11, 2026
3 tasks done

@delucis delucis left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: what happens for the inverse case where the " follows some CJK text? For example:

표지판에"About me"라고 적혀 있는 것 같아요.

@HiDeoo

HiDeoo commented Jun 11, 2026

Copy link
Copy Markdown
Contributor Author

what happens for the inverse case

Good call 🧠

I was so focused on fixing the issue the visual diff checker found, I didn't even think of that 🙌

@Princesseuh

Copy link
Copy Markdown
Member

Does the same thing happens to single quotes? It's less likely to happens in natural text, I assume, but if it's the same problem we could probably fix both

@HiDeoo

HiDeoo commented Jun 11, 2026

Copy link
Copy Markdown
Contributor Author

Does the same thing happens to single quotes? It's less likely to happens in natural text, I assume, but if it's the same problem we could probably fix both

It probably does but I intentionally avoided it for this PR as the same character can be used for quoted text and apostrophes. For example, 'We'll use Erika's parser' should become ‘We’ll use Erika’s parser’, so definitely more tricky (and probably require some research to get right as I personally don't know all the edge cases).

Altho if you want, I can investigate it and see if it could be added to this PR rather than a future one.

@Princesseuh

Copy link
Copy Markdown
Member

I think it's fine, if it ever comes up with single quotes we can fix it then :)

@Princesseuh
Princesseuh merged commit 42835bc into bruits:main Jun 11, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants