Syntax highlighting not working correctly

Post here questions and problems related to editing and publishing DITA content.
shannonxtreme
Posts: 31
Joined: Fri Aug 24, 2018 4:27 pm

Syntax highlighting not working correctly

Post by shannonxtreme »

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: 9058
Joined: Fri Jul 09, 2004 5:18 pm

Re: Syntax highlighting not working correctly

Post by Radu »

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 »

That worked great Radu, thanks!
Post Reply