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

ttl problems #1736

Closed
VladimirAlexiev opened this issue Apr 26, 2018 · 1 comment
Closed

ttl problems #1736

VladimirAlexiev opened this issue Apr 26, 2018 · 1 comment

Comments

@VladimirAlexiev
Copy link

@ellismarkf We noticed the following problems with the turtle (ttl) highlighter, and by inclusion the sparql highlighter. The turtle grammar is at https://www.w3.org/TR/turtle/#terminals

  1. pnames are highlighted only up to the first :
  2. Not all PN_CHARS are allowed, eg ff-map:is highlighted only *after* the-. One should be especially careful that .` is allowed in PNAMES but only if followed by another allowed char (see PN_PREFIX, PN_LOCAL)
  3. triple-apostrophe and triple-quote strings are mixed up. Eg this
'''foo """and""" bar'''

is highlighted as two strings: '''foo """ and """ bar'''
4. blank nodes are not highlighted
5. Would be nice to highlight @lang and ^^dt as a distinct class ("type")

We'll try to fix these problems

cc @nikolatulechki

@VladimirAlexiev
Copy link
Author

Implemented in #1746. cc @ellismarkf

Also added highlighting for JSON embedded in SPARQL triple-quote literal, which is used in Ontotext Elasticsearch and SOLR connectors. See example in https://github.com/VladimirAlexiev/highlight.js/blob/feature/language-sparql-ttl/test/detect/sparql/default.txt#L31

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

No branches or pull requests

1 participant