Skip to content

Theme Export: Convert spaces to tabs in theme.json - #39751

Merged
scruffian merged 1 commit into
trunkfrom
update/theme-json-tabbed
Mar 28, 2022
Merged

scruffian merged 1 commit into
trunkfrom
update/theme-json-tabbed

Conversation

@scruffian

@scruffian scruffian commented Mar 25, 2022 •

Copy link
Copy Markdown
Contributor

What?

Convert spaces to tabs when we export theme.json during a theme export.

Why?

WordPress coding standards require tabs for json files.

How?

This uses a regex to do the conversion.

Testing Instructions

  1. Switch to a theme that has a theme.json file
  2. Export the theme
  3. Check that the zip file contains a theme.json file with tabs not spaces

@WordPress/block-themers

@scruffian scruffian added the [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. label Mar 25, 2022
@scruffian scruffian self-assigned this Mar 25, 2022

@pbking pbking left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I couldn't find a situation where this didn't work as expected.

🚢 👍

@scruffian
scruffian force-pushed the update/theme-json-tabbed branch from ec21593 to 3542763 Compare March 28, 2022 11:30
@scruffian
scruffian merged commit dc2592e into trunk Mar 28, 2022
@scruffian
scruffian deleted the update/theme-json-tabbed branch March 28, 2022 13:28
@github-actions github-actions Bot added this to the Gutenberg 13.0 milestone Mar 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] Themes Questions or issues with incorporating or styling blocks in a theme.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants