Files
Agent-n8n/web_frontend/exhibition-demo/node_modules/prismjs/components/prism-toml.js
Yep_Q 1564396449 feat: 完善会展策划演示系统
详细说明:
- 添加了V2版本的工作流页面和结果页面
- 更新了Serena记忆文件
- 添加了详细实施计划文档
- 优化了Vite配置
- 更新了项目文档CLAUDE.md
- 构建了演示系统的dist版本
- 包含了exhibition-demo的完整依赖
2025-09-08 11:15:23 +08:00

50 lines
1.3 KiB
JavaScript

(function (Prism) {
var key = /(?:[\w-]+|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*")/.source;
/**
* @param {string} pattern
*/
function insertKey(pattern) {
return pattern.replace(/__/g, function () { return key; });
}
Prism.languages.toml = {
'comment': {
pattern: /#.*/,
greedy: true
},
'table': {
pattern: RegExp(insertKey(/(^[\t ]*\[\s*(?:\[\s*)?)__(?:\s*\.\s*__)*(?=\s*\])/.source), 'm'),
lookbehind: true,
greedy: true,
alias: 'class-name'
},
'key': {
pattern: RegExp(insertKey(/(^[\t ]*|[{,]\s*)__(?:\s*\.\s*__)*(?=\s*=)/.source), 'm'),
lookbehind: true,
greedy: true,
alias: 'property'
},
'string': {
pattern: /"""(?:\\[\s\S]|[^\\])*?"""|'''[\s\S]*?'''|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*"/,
greedy: true
},
'date': [
{
// Offset Date-Time, Local Date-Time, Local Date
pattern: /\b\d{4}-\d{2}-\d{2}(?:[T\s]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?)?\b/i,
alias: 'number'
},
{
// Local Time
pattern: /\b\d{2}:\d{2}:\d{2}(?:\.\d+)?\b/,
alias: 'number'
}
],
'number': /(?:\b0(?:x[\da-zA-Z]+(?:_[\da-zA-Z]+)*|o[0-7]+(?:_[0-7]+)*|b[10]+(?:_[10]+)*))\b|[-+]?\b\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?\b|[-+]?\b(?:inf|nan)\b/,
'boolean': /\b(?:false|true)\b/,
'punctuation': /[.,=[\]{}]/
};
}(Prism));