Syntax highlighting not working correctly

shannonxtreme
Posts: 31
Joined: Fri Aug 24, 2018 4:27 pm

Syntax highlighting not working correctly

Post by shannonxtreme » Mon Feb 03, 2020 8:12 pm

Hi, I'm using Oxygen 21.1, build 2019071807

I created a small ditamap with a single markdown file to document an API. I added a code block as follows:

```json
{
element1 [
"key": "value",
"key": value
]
}
```

I tried generating using the default Webhelp Responsive scenario, HTML5 & CSS PDF scenario, and DITA & CSS PDF scenario, but syntax highlighting didn't show up. What am I doing wrong?

Radu
Posts: 7029
Joined: Fri Jul 09, 2004 5:18 pm

Re: Syntax highlighting not working correctly

Post by Radu » Tue Feb 04, 2020 11:31 am

Hi,

You would need to use "language-json", something like this:

Code: Select all

```language-json
{
element1 [
"key": "value",
"key": "value"
]
}
```
This should generate the proper syntax highlight in the outputs.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

shannonxtreme
Posts: 31
Joined: Fri Aug 24, 2018 4:27 pm

Re: Syntax highlighting not working correctly

Post by shannonxtreme » Tue Feb 04, 2020 6:27 pm

That worked great Radu, thanks!

Post Reply