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

Highlights in Gatsby Style Guide Docs #18294

Closed
aditsachde opened this issue Oct 8, 2019 · 2 comments
Closed

Highlights in Gatsby Style Guide Docs #18294

aditsachde opened this issue Oct 8, 2019 · 2 comments
Labels
type: documentation An issue or pull request for improving or updating Gatsby's documentation

Comments

@aditsachde
Copy link
Contributor

While working on #18284, I noticed on the style guide page, there are two blocks under each highlighting example. One is supposed to be an example and the second one is supposed to be the rendered output.

The issue is the example uses // highlight-line which is stripped with regex I believe around here.

I would like to submit a PR to fix this, but I'm not really sure about the best way to fix this. I think there are a few options: Modify the regex, use a soft-hyphen to break the regex, or replace the code example with a written example.

I think the 3rd option is the best solution as it probably will be the least brittle. Explanation could be:


Use the // highlight-line keyword in order to highlight the line the directive is placed on.
<current example>

Use the // highlight-next-line keyword in order to highlight the line after the directive.
<current example>

Use the // highlight-start and //highlight-end keywords in order to highlight the lines between the two directives.
<current example>

@gatsbot gatsbot bot added the type: documentation An issue or pull request for improving or updating Gatsby's documentation label Oct 8, 2019
@marcysutton
Copy link
Contributor

marcysutton commented Oct 8, 2019

Thanks for the issue! I believe there's a PR open for this, see #17213

@aditsachde
Copy link
Contributor Author

Ah I missed that!

I'm going to go ahead and close this issue, but an issue might be useful for tracking the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: documentation An issue or pull request for improving or updating Gatsby's documentation
Projects
None yet
Development

No branches or pull requests

2 participants