exercism / elixir

Exercism exercises in Elixir.
https://exercism.org/tracks/elixir
MIT License
625 stars 398 forks source link

fix the disable comments for the markdown formatter #1493

Closed DerMolly closed 5 months ago

DerMolly commented 5 months ago

According to docs these comments should look like this. Hopefully this will prevent them from showing up on the exercism page e.g. https://exercism.org/tracks/elixir/exercises/rpn-calculator in the section "Try/Rescue"

CleanShot 2024-06-11 at 23 59 25@2x

See: https://hexdocs.pm/markdown_code_block_formatter/readme.html#disabling-the-formatter-for-specific-code-blocks

github-actions[bot] commented 5 months ago

Thank you for contributing to exercism/elixir 💜 🎉. This is an automated PR comment 🤖 for the maintainers of this repository that helps with the PR review process. You can safely ignore it and wait for a maintainer to review your changes.

Based on the files changed in this PR, it would be good to pay attention to the following details when reviewing the PR:


Automated comment created by PR Commenter 🤖.

angelikatyborska commented 5 months ago

Ooops, I didn't notice that they actually show up on the website 🙈

If we change them from [] to [//], then running ./bin/configlet generate moves the fake comment to the end of the generated file (exercises/concept/rpn-calculator/.docs/introduction.md). Which causes the CI to fail (the CI checks that all autogeneated files are up to date), and makes the comment useless because the comment's position in the file is important.

@ErikSchierboom can you advise, why do empty links without an url show up on the website? E.g. https://exercism.org/tracks/elixir/exercises/leap/approaches/operators

Screenshot 2024-06-12 at 06 20 12
ErikSchierboom commented 5 months ago

@ErikSchierboom can you advise, why do empty links without an url show up on the website?

It looks like that is the default behavior of our markdown library

DerMolly commented 5 months ago

So should we remove the comments altogether then? Or do you think it feasable to keep them and make them work like intended. Maybe some option in the markdown library / configlet or something.

ErikSchierboom commented 5 months ago

Maybe some option in the markdown library

I'm positive there isn't such an option available. We could manually override the default behavior, although I'm not sure that is possible. @iHiD what do you think?

angelikatyborska commented 5 months ago

We'll have to live with forced autoformatting in concept introductions 🤷 it's not the worst thing ever. I pushed one commit that updates that one code snippet that was resisting formatting before.

@DerMolly thank you for bringing this issue to our attention 🙏