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

Add basic syntax highlighting for PEGs #15

Merged
merged 1 commit into from
Oct 25, 2018

Conversation

wirelyre
Copy link
Contributor

This highlights most PEG code in the book.

Some code blocks are not written in full pest syntax, so they could not be trivially highlighted:

  • The "Grammars" chapter contains PEG expression fragments without named rules.
  • The "Parsing expression grammars" sub-chapter has ASCII art pointing to particular locations in strings.

It is not clear whether these should be highlighted at all, or whether it is appropriate to introduce another language.

Only builds since mdBook 0.2.2 (was blocked on rust-lang/mdBook#777).

Copy link
Contributor

@dragostis dragostis left a comment

Choose a reason for hiding this comment

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

LGTM! Really nice to have highlighting in the book. 👍

@wirelyre wirelyre merged commit 2a5c7a2 into pest-parser:master Oct 25, 2018
@wirelyre wirelyre deleted the syntax branch October 25, 2018 23:30
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.

2 participants