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

style: format the markdown and lint against it in ci #1829

Closed
wants to merge 2 commits into from

Conversation

simonsan
Copy link

To make future diffing easier and adopt a common style over the whole codebase.

This is essentially our dprint.json from https://github.com/rust-unofficial/patterns/blob/main/dprint.json

I think it would make it easier to merge these changes from #1817

TODO:

  • Does it affect the translations as line numbers change, or does parse the markdown directly?

…easier and adopt a common style over the whole codebase

Signed-off-by: simonsan <14062932+simonsan@users.noreply.github.com>
@rustbot
Copy link
Collaborator

rustbot commented Mar 18, 2024

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @marioidival (or someone else) some time within the next two weeks.

Signed-off-by: simonsan <14062932+simonsan@users.noreply.github.com>
@simonsan
Copy link
Author

simonsan commented Mar 18, 2024

@mgeisler Does this reformatting affect the mdbook-i18n-helper translations as line numbers change, or does parse it the markdown directly and this reformatting would be OK to do?

@mgeisler
Copy link

@mgeisler Does this reformatting affect the mdbook-i18n-helper translations as line numbers change, or does parse it the markdown directly and this reformatting would be OK to do?

Reformatting is fine! Version 0.2 of mdbook-i18n-helpers started normalizing the whitespace when extracting messages, so you won't see any change to the translations.

With version 0.3, we started to only extract string literals and comments from Markdown code blocks, so reformatting them will now also be invisible to the translations. You should run the mdbook-i18n-normalize tool on your existing translation files if you have files from version 0.1 that you need to migrate.

@marioidival marioidival closed this Sep 8, 2024
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.

4 participants