freeCodeCamp / publish

> Content backend platform for /news
https://publish.freecodecamp.org
BSD 3-Clause "New" or "Revised" License
10 stars 9 forks source link

"Add code" button and markdown backticks seem to be interfering #386

Open sidemt opened 7 months ago

sidemt commented 7 months ago

This is based on feedback from Abbey. There seems to be something is not quite right when adding/editing the code block.

To create a code block, it looks like you can type three backticks and the programming language and then type your code - but when I type three backticks to end the code block, it doesn't end it - it keeps formatting it like code

pressing the </> button stopped that formatting - but I think we need to enable markdown syntax where a code block can be "finished" by just typing the three backticks. Many of our authors use markdown to write their articles.

Sembauke commented 5 months ago

To create a code block, it looks like you can type three backticks and the programming language and then type your code - but when I type three backticks to end the code block, it doesn't end it - it keeps formatting it like code

This is because the content is automatically ended with three backticks, meaning you are in the middle of the surrounding backticks.

pressing the </> button stopped that formatting - but I think we need to enable markdown syntax where a code block can be "finished" by just typing the three backticks. Many of our authors use markdown to write their articles.

To exit the code formatting you need to press Command + Enter.

Nirajn2311 commented 5 months ago

I believe this behaviour is same as the one in Ghost.