Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unusual paragraph and span in a figcaption #19254

Open
1 task done
fueko opened this issue Dec 6, 2023 · 4 comments
Open
1 task done

Unusual paragraph and span in a figcaption #19254

fueko opened this issue Dec 6, 2023 · 4 comments
Labels
affects:editor Work relating to the Koenig Editor bug [triage] something behaving unexpectedly

Comments

@fueko
Copy link
Contributor

fueko commented Dec 6, 2023

Issue Summary

In the case of adding a figcaption to a Code card, a paragraph with the attribute dir='ltr' is introduced. This unusual paragraph, occurring only in this case, disrupts the theme formatting.

Zrzut ekranu 2023-12-6 o 10 19 57

Additionally, a <span> element with the style white-space: pre-wrap; is included — this also appears to be undesirable. The span element is added to every figcaption, not just those within the code element.

Zrzut ekranu 2023-12-6 o 10 21 13

Steps to Reproduce

Add a Code card with a figcaption, then check the code.

Ghost Version

5.75.1

Node.js Version

18.12.1

How did you install Ghost?

localhost

Database type

SQLite3

Browser & OS version

All

Relevant log / error output

No response

Code of Conduct

  • I agree to be friendly and polite to people in this repository
@github-actions github-actions bot added the needs:triage [triage] this needs to be triaged by the Ghost team label Dec 6, 2023
@daniellockyer daniellockyer added bug [triage] something behaving unexpectedly affects:editor Work relating to the Koenig Editor labels Dec 7, 2023
@github-actions github-actions bot removed the needs:triage [triage] this needs to be triaged by the Ghost team label Dec 7, 2023
@kushalsng
Copy link

HI @fueko
I would like to fix this issue. Can you please assign it to me?

@brvnnghi
Copy link

brvnnghi commented Dec 9, 2023

I saw the new element is saved into database as well, not just auto-generated by code:
<span class="white-space: pre-wrap;"> This is the caption</span>

Screenshot:
img 1

At first I thought this was a new standard for saving caption. Glad it is a bug... :D

@brvnnghi
Copy link

HI @fueko I would like to fix this issue. Can you please assign it to me?

Hi @kushalsng, I'd like to address this issue, but not able to find where it comes from. Could you please direct me to the file where this code is injected?
Thank you.

@robsoncoelho
Copy link

HI @fueko I would like to fix this issue. Can you please assign it to me?

Hey there,

Have you worked on it? It seems the issue is still persisting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects:editor Work relating to the Koenig Editor bug [triage] something behaving unexpectedly
Projects
None yet
Development

No branches or pull requests

5 participants