doc-en icon indicating copy to clipboard operation
doc-en copied to clipboard

Replace `<literal>` nodes with `<constant>` for constants

Open phansys opened this issue 2 years ago • 8 comments

172 occurrences were replaced from <literal>([A-Za-z0-9_]+)::([A-Z0-9_\*]+)</literal> to <constant>$1::$2</constant>.

See https://github.com/php/doc-en/pull/2306#issuecomment-1435653868.

TODO:

  • [ ] Wait for #1963.

phansys avatar Feb 18 '23 12:02 phansys

It would make sense to coordinate this with #1963 also to not repeat the work multiple times.

Girgias avatar Feb 20 '23 16:02 Girgias

Great! Let me inherit these changes here and mark the other PR in a TO-DO list in order to make the dependency explicit.

phansys avatar Feb 20 '23 16:02 phansys

Also it would be nice to fix the whitespaces in another PR that one can skip-revcheck as those clutter the PR.

Whitespace changes were reverted :+1:

phansys avatar Aug 31 '23 10:08 phansys

Sorry for the delay in this, could you rebase the PR on master?

Girgias avatar Apr 17 '24 12:04 Girgias

Rebased.

phansys avatar Apr 17 '24 13:04 phansys

There are a few constants with replaceable parts that use _XXX instead of _*. Do you think it would make sense to add those to this PR?

These are the ones I've found in doc-en:

CURL_VERSION_XXX
CURLM_XXX
CURLOPT_XXX
IMAGETYPE_XXX
PNG_FILTER_XXX
SOAP_PERSISTENCE_XXX
TIDY_TAG_XXX
VT_XXX

haszi avatar Apr 17 '24 14:04 haszi

I think these are missing cases @haszi. Thank you for pointing. Let me check if I can find a consistent way to catch them and I'll update the PR.

phansys avatar Apr 17 '24 14:04 phansys

The cases using the _XXX suffix were addressed.

phansys avatar Apr 17 '24 14:04 phansys