Skip to content

Conversation

@datamweb
Copy link
Contributor

@datamweb datamweb commented Feb 28, 2025

Description
Some template tags, such as {+ siteURL "login" +}, had extra quotation marks that caused parsing errors. We've resolved this by switching to code syntax for examples, ensuring correct interpretation and execution of the tags.

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@michalsn
Copy link
Member

I don't recall ever using plug-ins. Do I understand correctly that quotation marks are entirely disallowed around plugin parameters?

@michalsn
Copy link
Member

I've reviewed the source code of the plugins, and quotes are IMO recommended.

The issue seems to arise when copying examples from the user guide, where quotes are formatted as curly or smart quotes, which aren't parsed correctly in PHP.

We should consider using code syntax for our examples rather than plain text. This should resolve the issue.

@datamweb datamweb marked this pull request as draft February 28, 2025 20:07
@datamweb datamweb force-pushed the docs-fix-sample-code branch from e05e765 to d502ef6 Compare February 28, 2025 20:16
@datamweb
Copy link
Contributor Author

We should consider using code syntax for our examples rather than plain text.

You were right. It's fixed now.
Screenshot 2025-03-01 005219

@datamweb datamweb marked this pull request as ready for review February 28, 2025 21:26
@datamweb datamweb changed the title docs: fix parsing example code for plugin docs: switch to code syntax for parsing examples Feb 28, 2025
@michalsn michalsn added the documentation Pull requests for documentation only label Mar 1, 2025
@paulbalandan paulbalandan merged commit b21343a into codeigniter4:develop Mar 1, 2025
4 checks passed
@datamweb datamweb deleted the docs-fix-sample-code branch March 1, 2025 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Pull requests for documentation only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants