主要功能: - 修改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>
92 lines
3.1 KiB
JavaScript
92 lines
3.1 KiB
JavaScript
'use strict'
|
|
|
|
module.exports = kotlin
|
|
kotlin.displayName = 'kotlin'
|
|
kotlin.aliases = ['kt', 'kts']
|
|
function kotlin(Prism) {
|
|
;(function (Prism) {
|
|
Prism.languages.kotlin = Prism.languages.extend('clike', {
|
|
keyword: {
|
|
// The lookbehind prevents wrong highlighting of e.g. kotlin.properties.get
|
|
pattern:
|
|
/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,
|
|
lookbehind: true
|
|
},
|
|
function: [
|
|
{
|
|
pattern: /(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,
|
|
greedy: true
|
|
},
|
|
{
|
|
pattern: /(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,
|
|
lookbehind: true,
|
|
greedy: true
|
|
}
|
|
],
|
|
number:
|
|
/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,
|
|
operator:
|
|
/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/
|
|
})
|
|
delete Prism.languages.kotlin['class-name']
|
|
var interpolationInside = {
|
|
'interpolation-punctuation': {
|
|
pattern: /^\$\{?|\}$/,
|
|
alias: 'punctuation'
|
|
},
|
|
expression: {
|
|
pattern: /[\s\S]+/,
|
|
inside: Prism.languages.kotlin
|
|
}
|
|
}
|
|
Prism.languages.insertBefore('kotlin', 'string', {
|
|
// https://kotlinlang.org/spec/expressions.html#string-interpolation-expressions
|
|
'string-literal': [
|
|
{
|
|
pattern: /"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,
|
|
alias: 'multiline',
|
|
inside: {
|
|
interpolation: {
|
|
pattern: /\$(?:[a-z_]\w*|\{[^{}]*\})/i,
|
|
inside: interpolationInside
|
|
},
|
|
string: /[\s\S]+/
|
|
}
|
|
},
|
|
{
|
|
pattern: /"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,
|
|
alias: 'singleline',
|
|
inside: {
|
|
interpolation: {
|
|
pattern: /((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,
|
|
lookbehind: true,
|
|
inside: interpolationInside
|
|
},
|
|
string: /[\s\S]+/
|
|
}
|
|
}
|
|
],
|
|
char: {
|
|
// https://kotlinlang.org/spec/expressions.html#character-literals
|
|
pattern: /'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,
|
|
greedy: true
|
|
}
|
|
})
|
|
delete Prism.languages.kotlin['string']
|
|
Prism.languages.insertBefore('kotlin', 'keyword', {
|
|
annotation: {
|
|
pattern: /\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,
|
|
alias: 'builtin'
|
|
}
|
|
})
|
|
Prism.languages.insertBefore('kotlin', 'function', {
|
|
label: {
|
|
pattern: /\b\w+@|@\w+\b/,
|
|
alias: 'symbol'
|
|
}
|
|
})
|
|
Prism.languages.kt = Prism.languages.kotlin
|
|
Prism.languages.kts = Prism.languages.kotlin
|
|
})(Prism)
|
|
}
|