quarto-dev / quarto-dev/quarto-cli

Default highlight-style does not highlight well SQL code block

Open
#6,645 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement themes
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

Description

Hi,

I'm trying to display SQL code with highlighted syntax in a reveal JS presentation.

Here is my .qml code:

---
title: "test"
format: 
  revealjs:
    theme: beige
    smaller: false
    self-contained: true
    slide-number: c/t
    code-line-numbers: false
date: "septembre 2023"
date-format : "MMM YYYY"
---

```sql
select * from table1;
```

But my SQL keywords "select" and "from" are not highligthed (different color on keywords) in the HTML rendered doc (I'm using RStudio to compile the HTML document).
Did I miss something to achieve this?

Thanks in advance for your help.

Originally posted by @ced75 in https://github.com/quarto-dev/quarto-cli/discussions/6644

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Use the embedded .qml example as the reproduction entry point and compile it in RStudio to inspect the generated revealjs HTML. Confirm whether SQL keywords such as select and from receive distinct highlighting; done when the default highlight style renders them differently.

Written by the indexing model from the issue text.

Assessment

Tech stack
sql
Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.