Closed kshaner closed 6 years ago
@kshaner I cannot replicate this right now. What is the exact syntax error you're getting? What theme are you adding this to? What versions of WP-CLI, WordPress and your theme are you using?
Sorry @schlessera ,
WP_CLI: 2.0.1 Theme: Any I've tested (my custom theme, twentyseventeen) - the way it's built looks like it won't matter what theme is used.
The issue is that there is a missing quote mark in the mustache template for the theme at the end of line 34:
If you include the block in functions.php you'll get a parse error.
Ah, yes, I failed to actually include the block. I can confirm now.
Using the command
wp scaffold block header --title="Header" --category=layout --theme
produces a file with a syntax error on line 25 of the resulting block file: