Skip to content

Conversation

@NReib
Copy link
Contributor

@NReib NReib commented Mar 11, 2025

  • register CustomHtmlExtension to x-php5 mimeType
  • UnknownAttribute hint used to be at wrong position in source when embedded in PHP

Example:
customs.json

{
	"elements": {
		"y-customdefined": {
			"attributes": {
				"exists": {}
			}
		}
	},
	"attributes": {"globaldefined": {}}
}

PHP script including custom tags, so far none of the tags defined in customs.json will be valid

<x-customnotdefined><?php echo 'test'; ?></x-customnotdefined>
<y-customdefined exists="" noexists=""><?php echo 'test'; ?></y-customdefined>
<y-customdefined exists=""></y-customdefined>
<y-customdefined globaldefined=""></y-customdefined>
<y-customdefined noexists=""><?php echo 'test'; ?></y-customdefined>

-register CustomHtmlExtension to x-php5 mimeType
-UnknownAttribute hint used to be at wrong position in source when
embedded in PHP

Example:
customs.json
```json
{
	"elements": {
		"y-customdefined": {
			"attributes": {
				"exists": {}
			}
		}
	},
	"attributes": {"globaldefined": {}}
}
```

PHP script including custom tags, so far none of the tags defined in customs.json will be valid
```php
<x-customnotdefined><?php echo 'test'; ?></x-customnotdefined>
<y-customdefined exists="" noexists=""><?php echo 'test'; ?></y-customdefined>
<y-customdefined exists=""></y-customdefined>
<y-customdefined globaldefined=""></y-customdefined>
<y-customdefined noexists=""><?php echo 'test'; ?></y-customdefined>

```
@mbien mbien added PHP [ci] enable extra PHP tests (php/php.editor) HTML [ci] enable web job labels Mar 11, 2025
@mbien mbien linked an issue Mar 11, 2025 that may be closed by this pull request
@matthiasblaesing matthiasblaesing added this to the NB26 milestone Mar 13, 2025
@matthiasblaesing
Copy link
Contributor

@NReib thank you for looking into this. The change looks sane to me and looks simple enough to merge without new tests. I manually verified the location by checking the demo document and checking the reported positions. While it is not perfect after this change, it is an improvement.

I cleared the tests for running, added this to the NB26 milestone, @mbien already took care for adding the necessary labels to let the right unittest suites run.

@mbien
Copy link
Member

mbien commented Mar 13, 2025

restarting the tests, since approving the test run will unfortunately not take the new labels into account.

@apache apache locked and limited conversation to collaborators Mar 13, 2025
@apache apache unlocked this conversation Mar 13, 2025
@matthiasblaesing
Copy link
Contributor

darn thanks @mbien

Copy link
Contributor

@matthiasblaesing matthiasblaesing left a comment

Choose a reason for hiding this comment

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

Looks sane to me. @NReib please indicate if it is ok to merge from your perspective.

@NReib
Copy link
Contributor Author

NReib commented Mar 13, 2025

@matthiasblaesing From what I saw so far it would be ok to merge. We will use this feature in the future at my work but probably after the next release. So maybe then I will gain more insights.

@neilcsmith-net neilcsmith-net modified the milestones: NB26, NB27 Apr 16, 2025
@matthiasblaesing
Copy link
Contributor

Sorry, I forgot about this. Merging now. Thank you @NReib

@matthiasblaesing matthiasblaesing merged commit e8bc5c1 into apache:master Jul 13, 2025
56 of 63 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

HTML [ci] enable web job PHP [ci] enable extra PHP tests (php/php.editor)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[PHP] Allow use of custom HTML-Tags

4 participants