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

Code indents don't appear in Markdown on Talk #6686

Open
vrooje opened this issue Jun 30, 2023 · 3 comments · May be fixed by #7106
Open

Code indents don't appear in Markdown on Talk #6686

vrooje opened this issue Jun 30, 2023 · 3 comments · May be fixed by #7106

Comments

@vrooje
Copy link
Contributor

vrooje commented Jun 30, 2023

Expected behavior

If I write text within the code environment in Markdown on Talk,
    the indents should be
        preserved

Current behavior

When composing a Talk post, if I put in some code:
Screenshot 2023-06-30 at 13 26 26

and then click the preview button, the code text is rendered with indents preserved.
Screenshot 2023-06-30 at 13 26 50

However, once I click Submit and the post is created, the indents are not preserved,
Screenshot 2023-06-30 at 13 27 10

but the indents are still there in the text of the post when I go to edit it.
Screenshot 2023-06-30 at 13 27 53

It doesn't seem to matter whether the indents are spaces or a tab character.

Steps to replicate

Try putting in some indented text into a Talk post.

Additional information

  • Operating system: Mac OS X Monterey
  • Browser: Chrome and Safari; I tried both
@eatyourgreens
Copy link
Contributor

Test case here:
https://master.pfe-preview.zooniverse.org/talk/38/372?env=staging

Code blocks are wrapped in <pre>, which should preserve line-breaks and whitespace, but also styled to collapse whitespace:

white-space: pre-line

@eatyourgreens
Copy link
Contributor

eatyourgreens commented Jul 13, 2023

That style is set here:

> pre
white-space: pre-line

See #1602 and #1599.

@eatyourgreens eatyourgreens linked a pull request May 25, 2024 that will close this issue
18 tasks
@eatyourgreens
Copy link
Contributor

Should be fixed by #7106.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants