Skip to content

[feat] Implement PHP doQuotes logic - #432

Merged
kristian-clausal merged 2 commits into
tatuylonen:mainfrom
daxida:mediawiki-quotes
Sep 18, 2026
Merged

kristian-clausal merged 2 commits into
tatuylonen:mainfrom
daxida:mediawiki-quotes

Conversation

@daxida

@daxida daxida commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Convoluted because their logic is (and tbh, rightfully so). The myriad of tests and references to the original PHP code should be good enough (they don't even cover all of the edge cases of their implementation, so I didn't try it either!)

See tatuylonen/wiktextract#1706

The test I added in tatuylonen/wiktextract#1707 should pass when this lands, and we will have validation then to close that issue.

For full transparency, the code was LLM generated and only marginally tweaked by hand. I did check the implementation a couple times and really nudged it to simplify much of the initial boilerplate/noisy LLM output we all know and love.

Comment thread src/wikitextprocessor/parser.py
Comment thread src/wikitextprocessor/parser.py
Comment thread src/wikitextprocessor/parser.py
Comment thread src/wikitextprocessor/parser.py
@daxida

daxida commented Sep 17, 2026

Copy link
Copy Markdown
Contributor Author

Let me know if the wording of the comment suits you o/

@kristian-clausal kristian-clausal left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good to me.

@kristian-clausal
kristian-clausal merged commit e3d6d4e into tatuylonen:main Sep 18, 2026
6 checks passed
@kristian-clausal

Copy link
Copy Markdown
Collaborator

Thank you for the commit!

kristian-clausal added a commit to tatuylonen/wiktextract that referenced this pull request Sep 18, 2026
See wikitextprocessor tatuylonen/wikitextprocessor#432

Changes to how we parsed `'` tokens caused this test
to fail because the "bold" and the apostrophe next
to it moved places.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants