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 bad fenced-code-block labels. Formatting to help other markdown parsers. #34

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MorganShorter
Copy link

Identify the Bug

Bad labels on fenced code blocks prevented syntax highlighting on much of the code examples. Some uncommon labels like bash break highlighting on non-github parsing libs. Incorrect labels like labeling .ini config files as shell break highlighting everywhere.

Description of the Change

Changed fenced code block labels.

Changed 3 long in-lined code blocks to fenced blocks. Altered accompanying quote blocks for clarity. This was just my own pedantic preference.

Changed json to JSON in one line because it's and acronym and my cursor was already there.

Alternate Designs

Alternates break parsers. It's a bug. Excluding the inline blocks and JSON, of course

Possible Drawbacks

Some of my changes are not conformant to R Markdown, but are consistent with the rest of the project. Specifically, the lack of extra linefeed characters (newline).

Verification Process

Parser stopped breaking. Checked the output visually for unintended side-effects

find ./ -name README.md -execdir pandoc -t html -f gfm -o '{}'.html --standalone '{}' \;

Release Notes

Most examples now have correct syntax highlighting and improved visual clarity. Non-jekyll gfm parsers should now be able to properly identify fenced code blocks by their labels.

@MorganShorter
Copy link
Author

This is tangentially related and just my opinion: The TerraForm examples use TF format, for which neither GitHub, nor pandoc, have a parser. This is not exactly a bug, but a good illustration of why one might prefer to use JSON over TF where feasible -- availability of external parsing libraries. This is a minor issue for READMEs, but not so minor for automatic code generation tools. My $0.02.

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.

None yet

1 participant