Files
Agent-n8n/backups/exhibition-demo-backup-20250928-210916/node_modules/prismjs/components/prism-liquid.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

67 lines
2.6 KiB
JavaScript

Prism.languages.liquid = {
'comment': {
pattern: /(^\{%\s*comment\s*%\})[\s\S]+(?=\{%\s*endcomment\s*%\}$)/,
lookbehind: true
},
'delimiter': {
pattern: /^\{(?:\{\{|[%\{])-?|-?(?:\}\}|[%\}])\}$/,
alias: 'punctuation'
},
'string': {
pattern: /"[^"]*"|'[^']*'/,
greedy: true
},
'keyword': /\b(?:as|assign|break|(?:end)?(?:capture|case|comment|for|form|if|paginate|raw|style|tablerow|unless)|continue|cycle|decrement|echo|else|elsif|in|include|increment|limit|liquid|offset|range|render|reversed|section|when|with)\b/,
'object': /\b(?:address|all_country_option_tags|article|block|blog|cart|checkout|collection|color|country|country_option_tags|currency|current_page|current_tags|customer|customer_address|date|discount_allocation|discount_application|external_video|filter|filter_value|font|forloop|fulfillment|generic_file|gift_card|group|handle|image|line_item|link|linklist|localization|location|measurement|media|metafield|model|model_source|order|page|page_description|page_image|page_title|part|policy|product|product_option|recommendations|request|robots|routes|rule|script|search|selling_plan|selling_plan_allocation|selling_plan_group|shipping_method|shop|shop_locale|sitemap|store_availability|tax_line|template|theme|transaction|unit_price_measurement|user_agent|variant|video|video_source)\b/,
'function': [
{
pattern: /(\|\s*)\w+/,
lookbehind: true,
alias: 'filter'
},
{
// array functions
pattern: /(\.\s*)(?:first|last|size)/,
lookbehind: true
}
],
'boolean': /\b(?:false|nil|true)\b/,
'range': {
pattern: /\.\./,
alias: 'operator'
},
// https://github.com/Shopify/liquid/blob/698f5e0d967423e013f6169d9111bd969bd78337/lib/liquid/lexer.rb#L21
'number': /\b\d+(?:\.\d+)?\b/,
'operator': /[!=]=|<>|[<>]=?|[|?:=-]|\b(?:and|contains(?=\s)|or)\b/,
'punctuation': /[.,\[\]()]/,
'empty': {
pattern: /\bempty\b/,
alias: 'keyword'
},
};
Prism.hooks.add('before-tokenize', function (env) {
var liquidPattern = /\{%\s*comment\s*%\}[\s\S]*?\{%\s*endcomment\s*%\}|\{(?:%[\s\S]*?%|\{\{[\s\S]*?\}\}|\{[\s\S]*?\})\}/g;
var insideRaw = false;
Prism.languages['markup-templating'].buildPlaceholders(env, 'liquid', liquidPattern, function (match) {
var tagMatch = /^\{%-?\s*(\w+)/.exec(match);
if (tagMatch) {
var tag = tagMatch[1];
if (tag === 'raw' && !insideRaw) {
insideRaw = true;
return true;
} else if (tag === 'endraw') {
insideRaw = false;
return true;
}
}
return !insideRaw;
});
});
Prism.hooks.add('after-tokenize', function (env) {
Prism.languages['markup-templating'].tokenizePlaceholders(env, 'liquid');
});