简单键值文件的语言(主要用于语法突出显示)
因此,我有一些包含键值对的简单文件:
TITLE language for simple key-value file (mostly for syntax highlighting)
DESCRIPTION so i have some simple files that contain key-value pairs like this.
DESCRIPTION
DESCRIPTION values can span multiple lines (in which case the key is just
DESCRIPTION repeated)
URL https://stackoverflow.com/questions/72677445
因此,基本上,这是用于表达字典的声明性DSL:每行中的第一个单词是键,其余的就是值;钥匙和价值通过任意数量的白色分开。
现在,我希望这些文件获得一些基本的语法高光(使“键”部分与“值”部分显示不同),主要是github/gitlab/...
不幸的是,我不知道哪种语言“我应该使用。
- 该语法是如此的最低限度,以至于自动检测只是“纯文本”。
- 现代语法荧光笔支持多种语言(例如语言学家列出了大约650种不同的语言),这使得它是不可行的尝试每个。
有什么想法如何称为“语言”(或我可以滥用语法高音的哪种基本语言)?
so i have some simple files that contain key-value pairs like this:
TITLE language for simple key-value file (mostly for syntax highlighting)
DESCRIPTION so i have some simple files that contain key-value pairs like this.
DESCRIPTION
DESCRIPTION values can span multiple lines (in which case the key is just
DESCRIPTION repeated)
URL https://stackoverflow.com/questions/72677445
so basically this is a declarative DSL for expressing dictionaries: the first word in each line is the key, and the rest is the value; key and value are separated by an arbitrary amount of whitespace.
now, i would like these files to gain some basic syntax-highlighting (so that the "key" part is shown differently from the "value" part), mostly for github/gitlab/...
unfortunately I have no idea which "language" i should use.
- the syntax is so minimal, that autodetection just ends up with "plain text".
- modern syntax highlighters support a plethora of languages (e.g. linguist lists about 650 different languages), which makes it impractical to try each one.
any ideas how this "language" is called (or which base-language i could abuse for syntax-highlighting)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论