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

Fix code block indentation #18032

Closed

Conversation

SimplyDanny
Copy link

Before, the code snippets just wouldn't render as such and were empty with the code being interpreted as text below them.


  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?

Before, the code snippets just wouldn't render as such and were empty with the code being interpreted as text below them.
@SimplyDanny
Copy link
Author

Seems like CI is wrong here. Indentation was definitely not correct before. One example of the rendered Markdown:
Screenshot 2024-08-12 at 23 47 57

@ZhongRuoyu
Copy link
Member

ZhongRuoyu commented Aug 13, 2024

The rendered code blocks in the website look correct: https://docs.brew.sh/Formula-Cookbook#specifying-other-formulae-as-dependencies

So, it's a matter with GitHub's Markdown rendering. The indented version presented in this PR seems to render correctly by both Jekyll (Kramdown) and GitHub.

@ZhongRuoyu
Copy link
Member

CI failure is due to rubocop/rubocop-md#28.

@MikeMcQuaid
Copy link
Member

Thanks for your first PR @SimplyDanny! I'm afraid: given this works on docs.brew.sh, sorry, passing on this until rubocop/rubocop-md#28 is resolved.

@SimplyDanny
Copy link
Author

Thanks for your first PR @SimplyDanny! I'm afraid: given this works on docs.brew.sh, sorry, passing on this until rubocop/rubocop-md#28 is resolved.

Perhaps I'm the only one to read the docs right in the repository on GitHub or in a local editor. The thing is that there they are just broken on these code blocks.

So, it's a matter with GitHub's Markdown rendering. The indented version presented in this PR seems to render correctly by both Jekyll (Kramdown) and GitHub.

With that said, I wonder why some RuboCop style checks have a higher priority than the actual rendering in all sources.

@MikeMcQuaid
Copy link
Member

@SimplyDanny the primary method of consumption for these docs is https://docs.brew.sh. Beyond that: if syntax highlighting works/does not is not high priority.

Similarly: RuboCop is a high priority because it saves maintainer time which is the scarcest resource in this (and most other!) open source project(s).

@MikeMcQuaid MikeMcQuaid reopened this Aug 13, 2024
@MikeMcQuaid
Copy link
Member

(misclick on reopen sorry)

@SimplyDanny
Copy link
Author

Similarly: RuboCop is a high priority because it saves maintainer time which is the scarcest resource in this (and most other!) open source project(s).

I hear you and should probably go and set up stricter checks in my projects as well to make my life easier. 😅

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.

3 participants