Files
Agent-n8n/backups/exhibition-demo-backup-20250928-210916/node_modules/prismjs/components/prism-puppet.js
Yep_Q 67f5dfbe50 feat: 实现多订单班支持系统
主要功能:
- 修改RequirementModal支持12个订单班选择
- 添加OrderClassIconMap图标映射组件
- Store中添加selectedOrderClass状态管理
- WorkflowPage支持传递orderClass参数
- web_result添加URL参数切换功能
- 创建order-class-handler.js动态处理页面主题

技术改进:
- 创建软链接关联订单班数据目录
- 生成wenlu.json和food.json数据结构
- 删除重复的web_result目录
- 添加测试页面test-order-class.html

影响范围:
- 展会策划系统现支持12个订单班
- 结果展示页面自动适配不同订单班主题
- 用户可选择不同行业生成对应方案

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-29 10:02:15 +08:00

137 lines
3.9 KiB
JavaScript

(function (Prism) {
Prism.languages.puppet = {
'heredoc': [
// Matches the content of a quoted heredoc string (subject to interpolation)
{
pattern: /(@\("([^"\r\n\/):]+)"(?:\/[nrts$uL]*)?\).*(?:\r?\n|\r))(?:.*(?:\r?\n|\r(?!\n)))*?[ \t]*(?:\|[ \t]*)?(?:-[ \t]*)?\2/,
lookbehind: true,
alias: 'string',
inside: {
// Matches the end tag
'punctuation': /(?=\S).*\S(?= *$)/
// See interpolation below
}
},
// Matches the content of an unquoted heredoc string (no interpolation)
{
pattern: /(@\(([^"\r\n\/):]+)(?:\/[nrts$uL]*)?\).*(?:\r?\n|\r))(?:.*(?:\r?\n|\r(?!\n)))*?[ \t]*(?:\|[ \t]*)?(?:-[ \t]*)?\2/,
lookbehind: true,
greedy: true,
alias: 'string',
inside: {
// Matches the end tag
'punctuation': /(?=\S).*\S(?= *$)/
}
},
// Matches the start tag of heredoc strings
{
pattern: /@\("?(?:[^"\r\n\/):]+)"?(?:\/[nrts$uL]*)?\)/,
alias: 'string',
inside: {
'punctuation': {
pattern: /(\().+?(?=\))/,
lookbehind: true
}
}
}
],
'multiline-comment': {
pattern: /(^|[^\\])\/\*[\s\S]*?\*\//,
lookbehind: true,
greedy: true,
alias: 'comment'
},
'regex': {
// Must be prefixed with the keyword "node" or a non-word char
pattern: /((?:\bnode\s+|[~=\(\[\{,]\s*|[=+]>\s*|^\s*))\/(?:[^\/\\]|\\[\s\S])+\/(?:[imx]+\b|\B)/,
lookbehind: true,
greedy: true,
inside: {
// Extended regexes must have the x flag. They can contain single-line comments.
'extended-regex': {
pattern: /^\/(?:[^\/\\]|\\[\s\S])+\/[im]*x[im]*$/,
inside: {
'comment': /#.*/
}
}
}
},
'comment': {
pattern: /(^|[^\\])#.*/,
lookbehind: true,
greedy: true,
},
'string': {
// Allow for one nested level of double quotes inside interpolation
pattern: /(["'])(?:\$\{(?:[^'"}]|(["'])(?:(?!\2)[^\\]|\\[\s\S])*\2)+\}|\$(?!\{)|(?!\1)[^\\$]|\\[\s\S])*\1/,
greedy: true,
inside: {
'double-quoted': {
pattern: /^"[\s\S]*"$/,
inside: {
// See interpolation below
}
}
}
},
'variable': {
pattern: /\$(?:::)?\w+(?:::\w+)*/,
inside: {
'punctuation': /::/
}
},
'attr-name': /(?:\b\w+|\*)(?=\s*=>)/,
'function': [
{
pattern: /(\.)(?!\d)\w+/,
lookbehind: true
},
/\b(?:contain|debug|err|fail|include|info|notice|realize|require|tag|warning)\b|\b(?!\d)\w+(?=\()/
],
'number': /\b(?:0x[a-f\d]+|\d+(?:\.\d+)?(?:e-?\d+)?)\b/i,
'boolean': /\b(?:false|true)\b/,
// Includes words reserved for future use
'keyword': /\b(?:application|attr|case|class|consumes|default|define|else|elsif|function|if|import|inherits|node|private|produces|type|undef|unless)\b/,
'datatype': {
pattern: /\b(?:Any|Array|Boolean|Callable|Catalogentry|Class|Collection|Data|Default|Enum|Float|Hash|Integer|NotUndef|Numeric|Optional|Pattern|Regexp|Resource|Runtime|Scalar|String|Struct|Tuple|Type|Undef|Variant)\b/,
alias: 'symbol'
},
'operator': /=[=~>]?|![=~]?|<(?:<\|?|[=~|-])?|>[>=]?|->?|~>|\|>?>?|[*\/%+?]|\b(?:and|in|or)\b/,
'punctuation': /[\[\]{}().,;]|:+/
};
var interpolation = [
{
// Allow for one nested level of braces inside interpolation
pattern: /(^|[^\\])\$\{(?:[^'"{}]|\{[^}]*\}|(["'])(?:(?!\2)[^\\]|\\[\s\S])*\2)+\}/,
lookbehind: true,
inside: {
'short-variable': {
// Negative look-ahead prevent wrong highlighting of functions
pattern: /(^\$\{)(?!\w+\()(?:::)?\w+(?:::\w+)*/,
lookbehind: true,
alias: 'variable',
inside: {
'punctuation': /::/
}
},
'delimiter': {
pattern: /^\$/,
alias: 'variable'
},
rest: Prism.languages.puppet
}
},
{
pattern: /(^|[^\\])\$(?:::)?\w+(?:::\w+)*/,
lookbehind: true,
alias: 'variable',
inside: {
'punctuation': /::/
}
}
];
Prism.languages.puppet['heredoc'][0].inside.interpolation = interpolation;
Prism.languages.puppet['string'].inside['double-quoted'].inside.interpolation = interpolation;
}(Prism));