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

reStructuredText uses long token names for syntax highlighting #5349

Open
stephenfin opened this issue Oct 24, 2018 · 2 comments · May be fixed by #5350
Open

reStructuredText uses long token names for syntax highlighting #5349

stephenfin opened this issue Oct 24, 2018 · 2 comments · May be fixed by #5350

Comments

@stephenfin
Copy link

rst2html can generate HTML with short or long form class names for syntax highlighting. Pygments (via the pygmentize command) seems to generate short form by default without any way to switch this. This means most/any stylesheets for code provided with various themes won't work when using rST output. This can easily be fixed by providing the --syntax-highlight=short flag to rst2html.

stephenfin added a commit to stephenfin/hugo that referenced this issue Oct 24, 2018
@stephenfin stephenfin linked a pull request Oct 24, 2018 that will close this issue
stephenfin added a commit to stephenfin/hugo that referenced this issue Oct 24, 2018
stephenfin added a commit to stephenfin/hugo that referenced this issue Feb 19, 2019
@stale
Copy link

stale bot commented Feb 21, 2019

This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help.
If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.
This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.

@stale stale bot added the Stale label Feb 21, 2019
@stephenfin
Copy link
Author

This is a bug. Without this fix, we do not have syntax highlighting when using rST resources.

@stale stale bot removed the Stale label Feb 21, 2019
stephenfin added a commit to stephenfin/hugo that referenced this issue May 18, 2020
sumnerevans added a commit to sumnerevans/hugo that referenced this issue Feb 20, 2021
…ghlighting

* As noted in gohugoio#7759, rst2html exports math using the "HTML math.css"
  formatter by default. This means that any math typeset in
  reStructuredText is not formatted using MathJax which is not ideal.
  This commit adds a --math-output parameter configure rst2html to
  output math ready for MathJax to process. Note that I had to pick a
  URL for MathJax, but it doesn't end up in the resulting output because
  the <script> tag is in the header which gets cut out by code further
  down.

* As noted in gohugoio#5349, rst2html can generate HTML with short or long form
  class names for syntax highlighting. Pygments (via the pygmentize
  command) seems to generate short form by default without any way to
  switch this. This means most/any stylesheets for code provided with
  various themes won't work when using rST output. This can easily be
  fixed by providing the --syntax-highlight=short flag to rst2html.

Fixes: gohugoio#5349
Fixes: gohugoio#7759
sumnerevans added a commit to sumnerevans/hugo that referenced this issue Feb 20, 2021
…ghlighting

* As noted in gohugoio#7759, rst2html exports math using the "HTML math.css"
  formatter by default. This means that any math typeset in
  reStructuredText is not formatted using MathJax which is not ideal.
  This commit adds a --math-output parameter configure rst2html to
  output math ready for MathJax to process. Note that I had to pick a
  URL for MathJax, but it doesn't end up in the resulting output because
  the <script> tag is in the header which gets cut out by code further
  down.

* As noted in gohugoio#5349, rst2html can generate HTML with short or long form
  class names for syntax highlighting. Pygments (via the pygmentize
  command) seems to generate short form by default without any way to
  switch this. This means most/any stylesheets for code provided with
  various themes won't work when using rST output. This can easily be
  fixed by providing the --syntax-highlight=short flag to rst2html.

Fixes: gohugoio#5349
Fixes: gohugoio#7759
sumnerevans added a commit to sumnerevans/hugo that referenced this issue Feb 20, 2021
…ghlighting

* As noted in gohugoio#7759, rst2html exports math using the "HTML math.css"
  formatter by default. This means that any math typeset in
  reStructuredText is not formatted using MathJax which is not ideal.
  This commit adds a --math-output parameter configure rst2html to
  output math ready for MathJax to process. Note that I had to pick a
  URL for MathJax, but it doesn't end up in the resulting output because
  the <script> tag is in the header which gets cut out by code further
  down.

* As noted in gohugoio#5349, rst2html can generate HTML with short or long form
  class names for syntax highlighting. Pygments (via the pygmentize
  command) seems to generate short form by default without any way to
  switch this. This means most/any stylesheets for code provided with
  various themes won't work when using rST output. This can easily be
  fixed by providing the --syntax-highlight=short flag to rst2html.

Fixes: gohugoio#5349
Fixes: gohugoio#7759
sumnerevans added a commit to sumnerevans/hugo that referenced this issue Mar 1, 2021
…ghlighting

* As noted in gohugoio#7759, rst2html exports math using the "HTML math.css"
  formatter by default. This means that any math typeset in
  reStructuredText is not formatted using MathJax which is not ideal.
  This commit adds a --math-output parameter configure rst2html to
  output math ready for MathJax to process. Note that I had to pick a
  URL for MathJax, but it doesn't end up in the resulting output because
  the <script> tag is in the header which gets cut out by code further
  down.

* As noted in gohugoio#5349, rst2html can generate HTML with short or long form
  class names for syntax highlighting. Pygments (via the pygmentize
  command) seems to generate short form by default without any way to
  switch this. This means most/any stylesheets for code provided with
  various themes won't work when using rST output. This can easily be
  fixed by providing the --syntax-highlight=short flag to rst2html.

Fixes: gohugoio#5349
Fixes: gohugoio#7759
sumnerevans added a commit to sumnerevans/hugo that referenced this issue Apr 3, 2021
…ghlighting

* As noted in gohugoio#7759, rst2html exports math using the "HTML math.css"
  formatter by default. This means that any math typeset in
  reStructuredText is not formatted using MathJax which is not ideal.
  This commit adds a --math-output parameter configure rst2html to
  output math ready for MathJax to process. Note that I had to pick a
  URL for MathJax, but it doesn't end up in the resulting output because
  the <script> tag is in the header which gets cut out by code further
  down.

* As noted in gohugoio#5349, rst2html can generate HTML with short or long form
  class names for syntax highlighting. Pygments (via the pygmentize
  command) seems to generate short form by default without any way to
  switch this. This means most/any stylesheets for code provided with
  various themes won't work when using rST output. This can easily be
  fixed by providing the --syntax-highlight=short flag to rst2html.

Fixes: gohugoio#5349
Fixes: gohugoio#7759
sumnerevans added a commit to sumnerevans/hugo that referenced this issue May 31, 2021
…ghlighting

* As noted in gohugoio#7759, rst2html exports math using the "HTML math.css"
  formatter by default. This means that any math typeset in
  reStructuredText is not formatted using MathJax which is not ideal.
  This commit adds a --math-output parameter configure rst2html to
  output math ready for MathJax to process. Note that I had to pick a
  URL for MathJax, but it doesn't end up in the resulting output because
  the <script> tag is in the header which gets cut out by code further
  down.

* As noted in gohugoio#5349, rst2html can generate HTML with short or long form
  class names for syntax highlighting. Pygments (via the pygmentize
  command) seems to generate short form by default without any way to
  switch this. This means most/any stylesheets for code provided with
  various themes won't work when using rST output. This can easily be
  fixed by providing the --syntax-highlight=short flag to rst2html.

Fixes: gohugoio#5349
Fixes: gohugoio#7759

Co-authored by: Stephen Finucane <[email protected]>
Signed-off-by: Sumner Evans <[email protected]>
sumnerevans added a commit to sumnerevans/hugo that referenced this issue May 31, 2021
…ghlighting

* As noted in gohugoio#7759, rst2html exports math using the "HTML math.css"
  formatter by default. This means that any math typeset in
  reStructuredText is not formatted using MathJax which is not ideal.
  This commit adds a --math-output parameter configure rst2html to
  output math ready for MathJax to process. Note that I had to pick a
  URL for MathJax, but it doesn't end up in the resulting output because
  the <script> tag is in the header which gets cut out by code further
  down.

* As noted in gohugoio#5349, rst2html can generate HTML with short or long form
  class names for syntax highlighting. Pygments (via the pygmentize
  command) seems to generate short form by default without any way to
  switch this. This means most/any stylesheets for code provided with
  various themes won't work when using rST output. This can easily be
  fixed by providing the --syntax-highlight=short flag to rst2html.

Fixes: gohugoio#5349
Fixes: gohugoio#7759

Co-authored by: Stephen Finucane <[email protected]>
Signed-off-by: Sumner Evans <[email protected]>
sumnerevans added a commit to sumnerevans/hugo that referenced this issue May 31, 2021
…ghlighting

* As noted in gohugoio#7759, rst2html exports math using the "HTML math.css"
  formatter by default. This means that any math typeset in
  reStructuredText is not formatted using MathJax which is not ideal.
  This commit adds a --math-output parameter configure rst2html to
  output math ready for MathJax to process. Note that I had to pick a
  URL for MathJax, but it doesn't end up in the resulting output because
  the <script> tag is in the header which gets cut out by code further
  down.

* As noted in gohugoio#5349, rst2html can generate HTML with short or long form
  class names for syntax highlighting. Pygments (via the pygmentize
  command) seems to generate short form by default without any way to
  switch this. This means most/any stylesheets for code provided with
  various themes won't work when using rST output. This can easily be
  fixed by providing the --syntax-highlight=short flag to rst2html.

Fixes: gohugoio#5349
Fixes: gohugoio#7759

Co-authored-by: Stephen Finucane <[email protected]>
Signed-off-by: Sumner Evans <[email protected]>
sumnerevans added a commit to sumnerevans/hugo that referenced this issue Dec 25, 2021
…ghlighting

* As noted in gohugoio#7759, rst2html exports math using the "HTML math.css"
  formatter by default. This means that any math typeset in
  reStructuredText is not formatted using MathJax which is not ideal.
  This commit adds a --math-output parameter configure rst2html to
  output math ready for MathJax to process. Note that I had to pick a
  URL for MathJax, but it doesn't end up in the resulting output because
  the <script> tag is in the header which gets cut out by code further
  down.

* As noted in gohugoio#5349, rst2html can generate HTML with short or long form
  class names for syntax highlighting. Pygments (via the pygmentize
  command) seems to generate short form by default without any way to
  switch this. This means most/any stylesheets for code provided with
  various themes won't work when using rST output. This can easily be
  fixed by providing the --syntax-highlight=short flag to rst2html.

Fixes: gohugoio#5349
Fixes: gohugoio#7759

Co-authored-by: Stephen Finucane <[email protected]>
Signed-off-by: Sumner Evans <[email protected]>
sumnerevans added a commit to sumnerevans/hugo that referenced this issue Dec 25, 2021
…ghlighting

* As noted in gohugoio#7759, rst2html exports math using the "HTML math.css"
  formatter by default. This means that any math typeset in
  reStructuredText is not formatted using MathJax which is not ideal.
  This commit adds a --math-output parameter configure rst2html to
  output math ready for MathJax to process. Note that I had to pick a
  URL for MathJax, but it doesn't end up in the resulting output because
  the <script> tag is in the header which gets cut out by code further
  down.

* As noted in gohugoio#5349, rst2html can generate HTML with short or long form
  class names for syntax highlighting. Pygments (via the pygmentize
  command) seems to generate short form by default without any way to
  switch this. This means most/any stylesheets for code provided with
  various themes won't work when using rST output. This can easily be
  fixed by providing the --syntax-highlight=short flag to rst2html.

Fixes: gohugoio#5349
Fixes: gohugoio#7759

Co-authored-by: Stephen Finucane <[email protected]>
Signed-off-by: Sumner Evans <[email protected]>
sumnerevans added a commit to sumnerevans/hugo that referenced this issue Jan 12, 2022
…ghlighting

* As noted in gohugoio#7759, rst2html exports math using the "HTML math.css"
  formatter by default. This means that any math typeset in
  reStructuredText is not formatted using MathJax which is not ideal.
  This commit adds a --math-output parameter configure rst2html to
  output math ready for MathJax to process. Note that I had to pick a
  URL for MathJax, but it doesn't end up in the resulting output because
  the <script> tag is in the header which gets cut out by code further
  down.

* As noted in gohugoio#5349, rst2html can generate HTML with short or long form
  class names for syntax highlighting. Pygments (via the pygmentize
  command) seems to generate short form by default without any way to
  switch this. This means most/any stylesheets for code provided with
  various themes won't work when using rST output. This can easily be
  fixed by providing the --syntax-highlight=short flag to rst2html.

Fixes: gohugoio#5349
Fixes: gohugoio#7759

Co-authored-by: Stephen Finucane <[email protected]>
Signed-off-by: Sumner Evans <[email protected]>
sumnerevans added a commit to sumnerevans/hugo that referenced this issue Jan 26, 2022
…ghlighting

* As noted in gohugoio#7759, rst2html exports math using the "HTML math.css"
  formatter by default. This means that any math typeset in
  reStructuredText is not formatted using MathJax which is not ideal.
  This commit adds a --math-output parameter configure rst2html to
  output math ready for MathJax to process. Note that I had to pick a
  URL for MathJax, but it doesn't end up in the resulting output because
  the <script> tag is in the header which gets cut out by code further
  down.

* As noted in gohugoio#5349, rst2html can generate HTML with short or long form
  class names for syntax highlighting. Pygments (via the pygmentize
  command) seems to generate short form by default without any way to
  switch this. This means most/any stylesheets for code provided with
  various themes won't work when using rST output. This can easily be
  fixed by providing the --syntax-highlight=short flag to rst2html.

Fixes: gohugoio#5349
Fixes: gohugoio#7759
sumnerevans added a commit to sumnerevans/hugo that referenced this issue Jan 26, 2022
…ghlighting

* As noted in gohugoio#7759, rst2html exports math using the "HTML math.css"
  formatter by default. This means that any math typeset in
  reStructuredText is not formatted using MathJax which is not ideal.
  This commit adds a --math-output parameter configure rst2html to
  output math ready for MathJax to process. Note that I had to pick a
  URL for MathJax, but it doesn't end up in the resulting output because
  the <script> tag is in the header which gets cut out by code further
  down.

* As noted in gohugoio#5349, rst2html can generate HTML with short or long form
  class names for syntax highlighting. Pygments (via the pygmentize
  command) seems to generate short form by default without any way to
  switch this. This means most/any stylesheets for code provided with
  various themes won't work when using rST output. This can easily be
  fixed by providing the --syntax-highlight=short flag to rst2html.

Fixes: gohugoio#5349
Fixes: gohugoio#7759
sumnerevans added a commit to sumnerevans/hugo that referenced this issue Jan 26, 2022
…ghlighting

* As noted in gohugoio#7759, rst2html exports math using the "HTML math.css"
  formatter by default. This means that any math typeset in
  reStructuredText is not formatted using MathJax which is not ideal.
  This commit adds a --math-output parameter configure rst2html to
  output math ready for MathJax to process. Note that I had to pick a
  URL for MathJax, but it doesn't end up in the resulting output because
  the <script> tag is in the header which gets cut out by code further
  down.

* As noted in gohugoio#5349, rst2html can generate HTML with short or long form
  class names for syntax highlighting. Pygments (via the pygmentize
  command) seems to generate short form by default without any way to
  switch this. This means most/any stylesheets for code provided with
  various themes won't work when using rST output. This can easily be
  fixed by providing the --syntax-highlight=short flag to rst2html.

Fixes: gohugoio#5349
Fixes: gohugoio#7759
sumnerevans added a commit to sumnerevans/hugo that referenced this issue Jan 23, 2023
…ghlighting

* As noted in gohugoio#7759, rst2html exports math using the "HTML math.css"
  formatter by default. This means that any math typeset in
  reStructuredText is not formatted using MathJax which is not ideal.
  This commit adds a --math-output parameter configure rst2html to
  output math ready for MathJax to process. Note that I had to pick a
  URL for MathJax, but it doesn't end up in the resulting output because
  the <script> tag is in the header which gets cut out by code further
  down.

* As noted in gohugoio#5349, rst2html can generate HTML with short or long form
  class names for syntax highlighting. Pygments (via the pygmentize
  command) seems to generate short form by default without any way to
  switch this. This means most/any stylesheets for code provided with
  various themes won't work when using rST output. This can easily be
  fixed by providing the --syntax-highlight=short flag to rst2html.

Fixes: gohugoio#5349
Fixes: gohugoio#7759
sumnerevans added a commit to sumnerevans/hugo that referenced this issue May 6, 2024
…ghlighting

* As noted in gohugoio#7759, rst2html exports math using the "HTML math.css"
  formatter by default. This means that any math typeset in
  reStructuredText is not formatted using MathJax which is not ideal.
  This commit adds a --math-output parameter configure rst2html to
  output math ready for MathJax to process. Note that I had to pick a
  URL for MathJax, but it doesn't end up in the resulting output because
  the <script> tag is in the header which gets cut out by code further
  down.

* As noted in gohugoio#5349, rst2html can generate HTML with short or long form
  class names for syntax highlighting. Pygments (via the pygmentize
  command) seems to generate short form by default without any way to
  switch this. This means most/any stylesheets for code provided with
  various themes won't work when using rST output. This can easily be
  fixed by providing the --syntax-highlight=short flag to rst2html.

Fixes: gohugoio#5349
Fixes: gohugoio#7759
@bep bep added this to the v0.131.0 milestone Jul 30, 2024
@bep bep modified the milestones: v0.131.0, v0.133.0 Aug 9, 2024
@bep bep modified the milestones: v0.133.0, Unscheduled Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants