Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check support for /u flag in installed PCRE library #4852

Closed
2 tasks done
jaswrks opened this issue Feb 4, 2018 · 2 comments
Closed
2 tasks done

Check support for /u flag in installed PCRE library #4852

jaswrks opened this issue Feb 4, 2018 · 2 comments
Labels
[Feature] Parsing Related to efforts to improving the parsing of a string of data and converting it into a different f [Type] WP Core Ticket Requires an upstream change from WordPress. Core Trac ticket should be linked.

Comments

@jaswrks
Copy link
Contributor

jaswrks commented Feb 4, 2018

Issue Overview

Gutenberg's PEG parser expects the PCRE library to support the /u flag. We should probably check the installed PCRE library to confirm it supports this flag before using it. I opened a trac ticket in core to suggest a function for doing so: https://core.trac.wordpress.org/ticket/43224, and I've asked about this in the phpegjs package: nylen/phpegjs#9

Next Actions

@jeffpaul jeffpaul added the [Type] WP Core Ticket Requires an upstream change from WordPress. Core Trac ticket should be linked. label Mar 8, 2018
@danielbachhuber danielbachhuber added this to the WordPress 5.0 milestone Apr 11, 2018
@nylen
Copy link
Member

nylen commented Apr 26, 2018

This case is already handled in the Gutenberg code. See: #1869, https://github.com/WordPress/gutenberg/search?q=_gutenberg_utf8_split

The remaining follow-up item here is a core merge task, for which I'd suggest creating a separate issue. WordPress' _mb_substr compatibility function is almost exactly the same as _gutenberg_utf8_split introduced for this purpose, so these functions should be refactored to share most of their logic and only split off where they need to be different.

@mtias mtias added the [Feature] Parsing Related to efforts to improving the parsing of a string of data and converting it into a different f label Jul 17, 2018
@youknowriad
Copy link
Contributor

I don't think we're using PEG in php anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Parsing Related to efforts to improving the parsing of a string of data and converting it into a different f [Type] WP Core Ticket Requires an upstream change from WordPress. Core Trac ticket should be linked.
Projects
None yet
Development

No branches or pull requests

6 participants