Jump to content

Topic on Extension talk:SyntaxHighlight/Flow

inline with empty-string parameter after editing with Visual Editor

3
Amire80 (talkcontribs)

I created this version using wikitext editing, and it had <syntaxhighlight inline lang="perl">use strict;</syntaxhighlight>. Note the inline attribute without any parameter.

Then I edited the page using VE. I only changed the content of the tag. When I saved, inline changed to inline="". Is that correct?

The final rendering is the same, but what is the right way to store the attribute code? The documentation at Extension:SyntaxHighlight has no parameter at all.

BDavis (WMF) (talkcontribs)

The PHP code only checks to see if an "inline" attribute has been provided in the tag definition. No check is done to see if there is an associated value or not. It is relatively common to see HTML linters that get confused about bare attributes like "selected" and "checked" to recommend `attribute="attribute"` usage. There is nothing technical wrong with VE using `attribute=""` in this similar situation.

It does sound like behavior that could be considered a dirty diff from parsoid round tripping.

Tacsipacsi (talkcontribs)
Reply to "inline with empty-string parameter after editing with Visual Editor"