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

fix(talk): preserve whitespace in markdown code blocks #7106

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

eatyourgreens
Copy link
Contributor

@eatyourgreens eatyourgreens commented May 25, 2024

Style Markdown code blocks so that long lines wrap without collapsing whitespace.

Trim comments so that comments with leading whitespace aren't accidentally displayed as code blocks.

Screenshot of some Python code on Talk, with the indentation displayed as expected.

Test cases to run locally:

Talk discussions:

Required Manual Testing

  • Does the non-logged in home page render correctly?
  • Does the logged in home page render correctly?
  • Does the projects page render correctly?
  • Can you load project home pages?
  • Can you load the classification page?
  • Can you submit a classification?
  • Does talk load correctly?
  • Can you post a talk comment?

Review Checklist

  • Does it work in all major browsers: Firefox, Chrome, Edge, Safari?
  • Does it work on mobile?
  • Can you npm ci and app works as expected?
  • If the component is in coffeescript, is it converted to ES6? Is it free of eslint errors? Is the conversion its own commit?
  • Are the tests passing locally and on GitHub Actions?

Optional

@coveralls
Copy link

coveralls commented May 25, 2024

Coverage Status

coverage: 56.948%. remained the same
when pulling 5a54cfb on eatyourgreens:fix-code-whitespace
into 2d0f81a on zooniverse:master.

@eatyourgreens
Copy link
Contributor Author

eatyourgreens commented May 25, 2024

@eatyourgreens
Copy link
Contributor Author

eatyourgreens commented May 25, 2024

The original Planet Four comment, to test for regressions (and comments accidentally being displayed as code): https://www.zooniverse.org/projects/mschwamb/planet-four-terrains/talk/29/3494/?comment=6783

@eatyourgreens
Copy link
Contributor Author

A Talk comment with a Python script, that I just posted. This PR should fix the broken indentation here:
https://www.zooniverse.org/talk/18/3317233?comment=5524608

@eatyourgreens eatyourgreens force-pushed the fix-code-whitespace branch 2 times, most recently from eb2fbbe to cd256d2 Compare June 8, 2024 01:40
@eatyourgreens eatyourgreens force-pushed the fix-code-whitespace branch 2 times, most recently from 6826c93 to 5c3a8bc Compare June 22, 2024 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants