zooniverse / Panoptes-Front-End

Front end for zooniverse/Panoptes
https://www.zooniverse.org
Apache License 2.0
64 stars 75 forks source link

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

Open eatyourgreens opened 1 month ago

eatyourgreens commented 1 month ago

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

Review Checklist

Optional

coveralls commented 1 month ago

Coverage Status

coverage: 56.991%. remained the same when pulling 5c3a8bc2b0dc81dc1c28e8ea87d586187514c0eb on eatyourgreens:fix-code-whitespace into 78699da2a1e70781887dfb44c892ee1bb7ecc8fa on zooniverse:master.

eatyourgreens commented 1 month ago

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

eatyourgreens commented 1 month ago

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 commented 3 weeks ago

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