主要功能: - 修改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>
105 lines
2.3 KiB
JavaScript
105 lines
2.3 KiB
JavaScript
(function (Prism) {
|
|
|
|
var specialEscape = {
|
|
pattern: /\\[\\(){}[\]^$+*?|.]/,
|
|
alias: 'escape'
|
|
};
|
|
var escape = /\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/;
|
|
var charSet = {
|
|
pattern: /\.|\\[wsd]|\\p\{[^{}]+\}/i,
|
|
alias: 'class-name'
|
|
};
|
|
var charSetWithoutDot = {
|
|
pattern: /\\[wsd]|\\p\{[^{}]+\}/i,
|
|
alias: 'class-name'
|
|
};
|
|
|
|
var rangeChar = '(?:[^\\\\-]|' + escape.source + ')';
|
|
var range = RegExp(rangeChar + '-' + rangeChar);
|
|
|
|
// the name of a capturing group
|
|
var groupName = {
|
|
pattern: /(<|')[^<>']+(?=[>']$)/,
|
|
lookbehind: true,
|
|
alias: 'variable'
|
|
};
|
|
|
|
Prism.languages.regex = {
|
|
'char-class': {
|
|
pattern: /((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,
|
|
lookbehind: true,
|
|
inside: {
|
|
'char-class-negation': {
|
|
pattern: /(^\[)\^/,
|
|
lookbehind: true,
|
|
alias: 'operator'
|
|
},
|
|
'char-class-punctuation': {
|
|
pattern: /^\[|\]$/,
|
|
alias: 'punctuation'
|
|
},
|
|
'range': {
|
|
pattern: range,
|
|
inside: {
|
|
'escape': escape,
|
|
'range-punctuation': {
|
|
pattern: /-/,
|
|
alias: 'operator'
|
|
}
|
|
}
|
|
},
|
|
'special-escape': specialEscape,
|
|
'char-set': charSetWithoutDot,
|
|
'escape': escape
|
|
}
|
|
},
|
|
'special-escape': specialEscape,
|
|
'char-set': charSet,
|
|
'backreference': [
|
|
{
|
|
// a backreference which is not an octal escape
|
|
pattern: /\\(?![123][0-7]{2})[1-9]/,
|
|
alias: 'keyword'
|
|
},
|
|
{
|
|
pattern: /\\k<[^<>']+>/,
|
|
alias: 'keyword',
|
|
inside: {
|
|
'group-name': groupName
|
|
}
|
|
}
|
|
],
|
|
'anchor': {
|
|
pattern: /[$^]|\\[ABbGZz]/,
|
|
alias: 'function'
|
|
},
|
|
'escape': escape,
|
|
'group': [
|
|
{
|
|
// https://docs.oracle.com/javase/10/docs/api/java/util/regex/Pattern.html
|
|
// https://docs.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-language-quick-reference?view=netframework-4.7.2#grouping-constructs
|
|
|
|
// (), (?<name>), (?'name'), (?>), (?:), (?=), (?!), (?<=), (?<!), (?is-m), (?i-m:)
|
|
pattern: /\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,
|
|
alias: 'punctuation',
|
|
inside: {
|
|
'group-name': groupName
|
|
}
|
|
},
|
|
{
|
|
pattern: /\)/,
|
|
alias: 'punctuation'
|
|
}
|
|
],
|
|
'quantifier': {
|
|
pattern: /(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,
|
|
alias: 'number'
|
|
},
|
|
'alternation': {
|
|
pattern: /\|/,
|
|
alias: 'keyword'
|
|
}
|
|
};
|
|
|
|
}(Prism));
|