-
Notifications
You must be signed in to change notification settings - Fork 130
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
Src/Example blocks use code fence instead of highlight
if Goldmark
#499
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
kaushalmodi
changed the title
Example blocks use code fence instead of
Src/Example blocks use code fence instead of Jan 4, 2022
highlight
if Goldmarkhighlight
if Goldmark
kaushalmodi
force-pushed
the
code-fence-instead-of-highlight
branch
from
January 4, 2022 17:58
8d2b00c
to
93f2ee9
Compare
kaushalmodi
added a commit
that referenced
this pull request
Jan 4, 2022
This hack was to get around a limitation of the Pygments syntax highlighter about 5 years back (Pygments did not know how to highlight `org` lang!). But this hack wasn't necessary once Hugo started using Chroma after v0.28. Ref: #60 Reasons for removing this hack blatantly: - I was probably the only one using it, but stopped using this after Oct 2017. - It's creating too much noise in the code. So I want to clean this up before I add commits for #499. - And I don't want to support this hack any more. - If someone still is using a Hugo version older than 0.28 and is using Pygments, they need to update. (ok.. if you really don't want to update, use the new `org-blackfriday-syntax-highlighting-langs` and add `("org" . "text")` to it.)
kaushalmodi
added a commit
that referenced
this pull request
Jan 4, 2022
This hack was to get around a limitation of the Pygments syntax highlighter about 5 years back (Pygments did not know how to highlight `org` lang!). But this hack wasn't necessary once Hugo started using Chroma after v0.28. Ref: #60 Reasons for removing this hack blatantly: - I was probably the only one using it, but stopped using this after Oct 2017. - It's creating too much noise in the code. So I want to clean this up before I add commits for #499. - And I don't want to support this hack any more. - If someone still is using a Hugo version older than 0.28 and is using Pygments, they need to update. (ok.. if you really don't want to update, use the new `org-blackfriday-syntax-highlighting-langs` and add `("org" . "text")` to it.)
Add test case for highlight sc export for example block.
kaushalmodi
force-pushed
the
code-fence-instead-of-highlight
branch
from
January 4, 2022 22:10
93f2ee9
to
99eb69e
Compare
No functional change Refactoring done for better code clarity and to prep up for the changes needed in src block export for #305.
kaushalmodi
force-pushed
the
code-fence-instead-of-highlight
branch
from
January 4, 2022 22:11
99eb69e
to
f959758
Compare
Use the `example-code` derived from `org-hugo-example-block` in `org-blackfriday-example-block` even when line numbers are not enabled, but fenced code blocks are enabled (`use-highlight-sc` == nil). It's not a ground breaking optimization.. just that a call to `org-export-format-code-default` will be skipped in `org-blackfriday-example-block`.
kaushalmodi
added a commit
that referenced
this pull request
Jan 4, 2022
Ref: - #499 - #305 This update also "fixes" #161. The code fenced block don't have the same issue as the `highlight` shortcode does. As we now export line numbered code blocks as fenced code blocks by default and are moving away from the buggy `highlight` shortcode, we are bypassing issue #161. If you don't like the change in behavior of src block exports in this commit, customize `org-hugo-goldmark`. See #485.
kaushalmodi
force-pushed
the
code-fence-instead-of-highlight
branch
from
January 4, 2022 23:55
e59c1e6
to
19c6f50
Compare
Ref: - #499 - #305 This update also "fixes" #161. The code fenced block don't have the same issue as the `highlight` shortcode does. As we now export line numbered code blocks as fenced code blocks by default and are moving away from the buggy `highlight` shortcode, we are bypassing issue #161. If you don't like the change in behavior of src block exports in this commit, customize `org-hugo-goldmark`. See #485.
kaushalmodi
force-pushed
the
code-fence-instead-of-highlight
branch
from
January 4, 2022 23:56
19c6f50
to
3bccbd8
Compare
This was referenced Jan 5, 2022
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.
Fixes #305 and #161.
Also see #485.