Skip to content
This repository has been archived by the owner on May 18, 2023. It is now read-only.

Markdown guides: language syntax highlighting not in place #303

Open
1 of 6 tasks
SueChaplain opened this issue Nov 25, 2019 · 5 comments
Open
1 of 6 tasks

Markdown guides: language syntax highlighting not in place #303

SueChaplain opened this issue Nov 25, 2019 · 5 comments

Comments

@SueChaplain
Copy link
Contributor

SueChaplain commented Nov 25, 2019

Describe the bug

Adding syntax highlighting for xml files in markdown source does not render any colour in the built HTML.

For example:

<!-- OpenLiberty runtime -->
<liberty.groupId>io.openliberty</liberty.groupId>
<liberty.artifactId>openliberty-runtime</liberty.artifactId>
<version.openliberty-runtime>19.0.0.8</version.openliberty-runtime>
<http.port>9080</http.port>
<https.port>9443</https.port>
<packaging.type>usr</packaging.type>
<app.name>${project.artifactId}</app.name>
<package.file>${project.build.directory}/${app.name}.zip</package.file>

Text is just orange and not a combination of green and orange as generated when built from AsciiDoc. The HTML source is marked up, so possibly a CSS issue.

<div class="language-xml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c">&lt;!-- OpenLiberty runtime --&gt;</span>
  | <span class="nt">&lt;liberty.groupId&gt;</span>io.openliberty<span class="nt">&lt;/liberty.groupId&gt;</span>

Expected behavior

Code highlighted in green and orange

Actual behavior

Code only highlighted in orange

Steps to reproduce the bug

Add the example above into a markdown guide and build locally.

Environment where the bug occurred

  • Firefox (Desktop)
  • Safari (Desktop)
  • Chrome (Desktop)
  • Internet Explorer (Desktop)
  • iOS (Mobile)
  • Android (Mobile)

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

@alohr51
Copy link
Member

alohr51 commented Nov 25, 2019

@SueChaplain currently with our setup that is a limitation with markdown guides. the syntax highlighting is only a feature for asciidoc currently.

@alohr51
Copy link
Member

alohr51 commented Nov 25, 2019

Someone can take a look into https://github.com/kramdown/syntax-coderay (although I would suggest against it since it doesn't look highly maintained) but again, this is already available using asciidoc guides

@SueChaplain
Copy link
Contributor Author

I was assuming this would be supported by the build: https://www.markdownguide.org/extended-syntax/#syntax-highlighting

Is that not possible?

@alohr51
Copy link
Member

alohr51 commented Nov 25, 2019

Our setup uses Kramdown which needs a 3rd party gem (the link I added above) to be installed to support syntax highlighting. It seems poorly maintained so it could be risky to add it as a dependency.

@SueChaplain
Copy link
Contributor Author

Looks like Rouge is the default these days: https://kramdown.gettalong.org/syntax_highlighter/rouge.html

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants