AdvancedCustomFields / AdvancedCustomFields/acf

jsx support removes spaces between html tags and text

Open
#480 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
945
Forks
197
PR merge metrics
No merged PRs in 30d

Description

WordPress: 5.7
Gutenberg: 10.3.1
ACF: 5.9.5

Hi,

ACF strips out spaces between closing html tags and normal text from fields like wysiwyg and textarea when enabling jsx support:

acf_register_block_type([
    [...],
    'supports' => [
        'jsx'   => true
    ],
]);

image
image
image

For comparison when removing jsx support:
image
image

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with WordPress 5.7, Gutenberg 10.3.1, ACF 5.9.5, and a block registered through acf_register_block_type with JSX support enabled. Compare WYSIWYG and textarea output with and without JSX support; done means spaces between closing HTML tags and following text are preserved.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, wordpress
Domain
content, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.