-
Notifications
You must be signed in to change notification settings - Fork 7
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
Include changes from other PRs, resolving conflicts #22
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Use the file extension as the language class for highlight.js appears to support file extensions as language classes, see: https://github.com/highlightjs/highlight.js#supported-languages
It must be more accurate than the file extension.
Allow empty title for code snippets. It may be useful for short code fragments.
Always use UTF-8 as it is commonly used for platform-independent source files.
The fix in 2979ea4 was incomplete: see the added tests.
Use the last line indent so that the result can be un-indented by the caller. It prevents results like this: ``` /* block 1 */ ... /* block 2 */ ``` turning them into ``` /* block 1 */ ... /* block 2 */ ``` which will be dedented by the caller.
This was referenced Oct 18, 2020
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Indent the ellipsis between non-adjacent lines (#15)
Use the last line indent so that the result can be
un-indented by the caller. It prevents results like this:
turning them into
which will be dedented by the caller.
Allow selectors on next line (#10)
Allows targeting expressions to be on the next line:
I kept the usage of a regular expression to find the include definitions, but had to change the implementation to use
re.findall
and a multiline expression instead ofre.match
over a single line.The processing is now separated into three stages:
Resolves #9
Fix inside_block inclusion with multiple curly brackets on the same line (#14)
Add support for any language (#5)
Auto-detect the source language and the alias to use using the Pygments API.
Allow empty titles (#6)
Allow empty title for code snippets. It may be useful for short code fragments.