MagicStack / MagicStack/MagicPython
Highlighting of SQL inside strings
还没有人认领这个 Issue。
- 主要语言
- JavaScript
- 星标
- 1.4k
- 派生
- 98
- PR 合并指标
- 30 天内没有已合并 PR
描述
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?
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
未指定文件或测试。请在受支持的编辑器集成中重现两个 Python 字符串示例,然后检查 Python 字符串处理和 SQL 高亮的入口点,以了解 CREATE TABLE 为何与 INSERT 不同。完成的标准是:两个示例中的 SQL 关键字都能获得一致的高亮,同时不破坏普通的 Python 字符串。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python, sql
- 领域
- tooling
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 32/100