Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Highlighting of SQL inside strings

Open
#27 16 comments 133 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
32/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
python, sql
Domain
tooling

Research direction

No files or tests are named. Reproduce the two Python string examples in the supported editor integrations, then inspect the Python string-handling and SQL-highlighting entry points to understand why CREATE TABLE differs from INSERT. Done means SQL keywords receive consistent highlighting in both examples without breaking ordinary Python strings.

Written by the indexing model from the issue text.

Description

enhancement question

The stock Python package performs syntax highlighting inside strings containing SQL commands. That's rather useful, even though the implementation might need some more work. In this example:

create = 'CREATE TABLE test (id INT, name TEXT);'
insert = 'INSERT INTO test VALUES (1, "Bob")'

in the second line, words recognized as SQL are highlighted, but not in the first one, where "CREATE TABLE" has the same color as the non-reserved names.

(Actually, as you can see, even Github's Markdown does it, with exactly the same behavior, so perhaps something is wrong with the first line, although it does execute properly)

Do you consider this a useful addition?

Dominant language
JavaScript
Stars
1.4k
Forks
98
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

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.

More from MagicStack/MagicPython

All issues in MagicStack/MagicPython

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.