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

Syntax highlighting for Org source blocks #60

Closed
kaushalmodi opened this issue Aug 4, 2017 · 3 comments
Closed

Syntax highlighting for Org source blocks #60

kaushalmodi opened this issue Aug 4, 2017 · 3 comments
Labels

Comments

@kaushalmodi
Copy link
Owner

kaushalmodi commented Aug 4, 2017

At the moment, export of below does not work well with fenced code blocks:

```org
# Org comment
```

See https://bitbucket.org/birkenfeld/pygments-main/issues/719/wishlist-support-org.

Workaround for now is to remove that org tag from the fenced code block.


This is specific to the case where pygmentsCodeFences = true is added to Hugo config.toml.

@kaushalmodi
Copy link
Owner Author

kaushalmodi added a commit that referenced this issue Aug 7, 2017
The earlier org-hugo-pygments-code-fences boolean var is now replaced
with symbol list defcustom org-hugo-langs-no-desc-in-code-fences.  To
get the same behavior as setting org-hugo-pygments-code-fences to t,
set org-hugo-langs-no-desc-in-code-fences to '(org).
@kaushalmodi
Copy link
Owner Author

gohugoio/hugo#3783

@kaushalmodi
Copy link
Owner Author

This is a non-issue with Chroma syntax highlighter (default in Hugo since v0.28).

kaushalmodi added a commit that referenced this issue 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 issue 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.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant