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

Format admonitions #2327

Merged
merged 13 commits into from
Sep 27, 2023
Merged

Format admonitions #2327

merged 13 commits into from
Sep 27, 2023

Conversation

ErikSchierboom
Copy link
Member

  • Add script to format admonitions
  • Format admonitions in format-md NPM script
  • Update admonitions

@ErikSchierboom ErikSchierboom requested a review from a team as a code owner September 20, 2023 14:01
bin/format-admonitions.rb Outdated Show resolved Hide resolved
bin/format-admonitions.rb Outdated Show resolved Hide resolved
@ErikSchierboom
Copy link
Member Author

CC @exercism/reviewers

Copy link
Member

@ee7 ee7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, should tracks that format files with prettier also do this?

I checked that, with this PR, there's no more backtick-using admonition in this repo:

$ git rev-parse --short HEAD
909c8864
$ git grep --break --heading '`exercism/' -- '*.md'
$ git grep --break --heading '~exercism/' -- '*.md'
exercises/binary:search/instructions.md
8:~~~~exercism/caution

exercises/etl/instructions.md
25:~~~~exercism/note

exercises/gigasecond/introduction.md
16:~~~~exercism/note

exercises/linked:list/instructions.md
16:~~~~exercism/note

exercises/pangram/introduction.md
10:~~~~exercism/note

exercises/rational:numbers/description.md
5:~~~~exercism/note

exercises/rna:transcription/instructions.md
18:~~~~exercism/note

exercises/rna:transcription/introduction.md
7:~~~~exercism/note

exercises/secret:handshake/instructions.md
44:~~~~exercism/note

exercises/sieve/instructions.md
21:~~~~exercism/note

exercises/simple:linked-list/instructions.md
10:~~~~exercism/note

.github/workflows/action-format.yml Show resolved Hide resolved
.github/workflows/ci.yml Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
@iHiD
Copy link
Member

iHiD commented Sep 21, 2023

So, should tracks that format files with prettier also do this?

Yes. And Erik's going to do a big PR for it I believe.

@ErikSchierboom
Copy link
Member Author

So, should tracks that format files with prettier also do this?

Ideally, yes I think. We could also bake this check into configlet maybe?

@ee7
Copy link
Member

ee7 commented Sep 21, 2023

We could also bake this check into configlet maybe?

That's possible. But I think it'd be better to have an org-wide workflow that runs markdownlint, checks admonitions, and performs any other Exercism-specific markdown linting. One reason: configlet lint only runs in track repos, and not every repo that may contain an admonition is a track repo.

Thoughts?

Related: exercism/configlet#562
Related: exercism/configlet#741

@ErikSchierboom
Copy link
Member Author

That's possible. But I think it'd be better to have an org-wide workflow that runs markdownlint, checks admonitions, and performs any other Exercism-specific markdown linting. Thoughts?

That's a nice idea

@ee7
Copy link
Member

ee7 commented Sep 21, 2023

I previously created a tracking issue for it: exercism/org-wide-files#214

ee7 added a commit to exercism/zig that referenced this pull request Sep 21, 2023
A recent commit [1] changed these to 3 backticks to reflect a commit in
problem-specifications [2], but problem-specfications plans to revert
the changes to admonitions [3].

[1] 3eed72b, 2023-09-19, "exercises: sync docs for 13 exercises"
[2] exercism/problem-specifications@435e86aec55b
[3] exercism/problem-specifications#2327
@ErikSchierboom
Copy link
Member Author

CC @exercism/reviewers Once this PR is merged, I can do the cross-repo PR.

@ErikSchierboom ErikSchierboom merged commit 430e45b into main Sep 27, 2023
7 checks passed
@ErikSchierboom ErikSchierboom deleted the format-admonitions branch September 27, 2023 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants