Problem/Motivation

SmartyPants replaces single quotes that are at the end of a line.
This leads to an apostroph at the end of a line which can be surprising for users.

Steps to reproduce

Enable the Use typographers quotation marks and dashes option on a French text field.

Test 'foo' is replaced by Test ‹foo’
Test 'foo' bar is replaced by Test ‹foo› bar

Proposed resolution

The regex in SmartyPants::educateQuotes() probably needs to be tweaked.

Issue fork typogrify-3362369

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

prudloff created an issue. See original summary.

prudloff’s picture

Status: Active » Needs review

benjifisher made their first commit to this issue’s fork.

benjifisher’s picture

Status: Needs review » Reviewed & tested by the community

@prudloff:

Thanks for this fix. Your change looks good, and it works with manual testing. RTBC

I merged with the main branch, which now includes the updates from #3567314: Kernel test fails to run with PHPUnit 11.5.44 and #3541965: PHP 8.4 support. Then I added some test coverage for the change in this issue. If the tests pass, then I will merge.

benjifisher’s picture

Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.