exercism / elixir

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

Set up MarkdownCodeBlockFormatter #1419

Closed angelikatyborska closed 8 months ago

angelikatyborska commented 8 months ago

I wrote an Elixir formatter plugin that is able to format Elixir code in Markdown files. @jiegillet @neenjaw what do you think?

(I'll publish it to hex before merging)

github-actions[bot] commented 8 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 8 months ago

Part of the problem is that there is no one Markdown standard 😞 This syntax:

[]: # (elixir-formatter-disable-next-block)

It's an abused reference-style link. More generically, it's:

[reference-name]: https://example.com (Some link title)

Now, I don't know if all Markdown implementations support reference-style links, but Exercism definitely depends on them. I'm pretty sure that # must be a valid link href, and elixir-formatter-disable-next-block is a valid link title. The only thing I'm unsure about is an empty reference name. I didn't see any problems so far. It could also be non-empty (could be anything), but configlet generate moves all non-empty link references to the bottom of the markdown file which messes up with my intended use 😁