ACTION 208 how to do TTL syntax highlighting in examples

Hi- at today's BP sub-group call (minutes [1]) Andrea asked about how to do
syntax highlighting in Examples - specifically for the Turtle RDF
serialisation.

Referring to CSV2RDF ยง7.1 "Simple example" [2] where I've done this before,
I see that the HTML / Respec source for `Example 4` says:

```
        <pre class="example highlight"
             id="example-countries-minimal-ttl"
             title="http://example.org/countries-minimal.ttl"
             data-include="../examples/countries-minimal.ttl"
             data-oninclude="updateExample">
        </pre>
```

In CSV2RDF we refer out to the example text so that we can reuse them
across CSV2JSON and CSV2RDF. That doesn't matter for us, but you should see

 class="example highlight"

which is how to instruct Respec about syntax highlighting. It looks as
though it detects the language ...

That said, I see that we've done this in the SDW Best Practice document too!

The Respec User manual [3] says:
"The syntax highlighter does not need to be instructed about which language
it is highlighting and will try to do a decent job of guessing."

May be there isn't a way to instruct it to "do TTL highlighting"?

@phila: WDYT?

Jeremy


[1]: https://www.w3.org/2016/10/12-sdwbp-minutes.html
[2]: https://www.w3.org/TR/csv2rdf/#example-countries
[3]:
https://github.com/w3c/respec/wiki/User's-Guide#examples--syntax-highlighting

Received on Wednesday, 12 October 2016 15:32:46 UTC