mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 11:35:12 +08:00
# Conflicts: # jsowell-ui/.env.development # jsowell-ui/.env.staging # jsowell-ui/bin/build-sit.bat # jsowell-ui/bin/build.bat # jsowell-ui/src/api/adapayMember/adapayMember.js # jsowell-ui/src/api/pile/merchant.js # jsowell-ui/src/router/index.js # jsowell-ui/src/views/financial/financeDetail.vue # jsowell-ui/src/views/financial/merchant.vue # jsowell-ui/src/views/homeIndex/homeIndex.vue # jsowell-ui/src/views/login.vue # jsowell-ui/src/views/pile/basic/detail.vue # jsowell-ui/src/views/pile/station/components/SiteInfo.vue # jsowell-ui/src/views/pile/station/detail.vue # jsowell-ui/src/views/pile/station/orderReport.vue
43 lines
1.1 KiB
JavaScript
43 lines
1.1 KiB
JavaScript
module.exports = function(hljs) {
|
|
var LITERALS = {literal: 'true false null'};
|
|
var ALLOWED_COMMENTS = [
|
|
hljs.C_LINE_COMMENT_MODE,
|
|
hljs.C_BLOCK_COMMENT_MODE
|
|
]
|
|
var TYPES = [
|
|
hljs.QUOTE_STRING_MODE,
|
|
hljs.C_NUMBER_MODE
|
|
];
|
|
var VALUE_CONTAINER = {
|
|
end: ',', endsWithParent: true, excludeEnd: true,
|
|
contains: TYPES,
|
|
keywords: LITERALS
|
|
};
|
|
var OBJECT = {
|
|
begin: '{', end: '}',
|
|
contains: [
|
|
{
|
|
className: 'attr',
|
|
begin: /"/, end: /"/,
|
|
contains: [hljs.BACKSLASH_ESCAPE],
|
|
illegal: '\\n',
|
|
},
|
|
hljs.inherit(VALUE_CONTAINER, {begin: /:/})
|
|
].concat(ALLOWED_COMMENTS),
|
|
illegal: '\\S'
|
|
};
|
|
var ARRAY = {
|
|
begin: '\\[', end: '\\]',
|
|
contains: [hljs.inherit(VALUE_CONTAINER)], // inherit is a workaround for a bug that makes shared modes with endsWithParent compile only the ending of one of the parents
|
|
illegal: '\\S'
|
|
};
|
|
TYPES.push(OBJECT, ARRAY);
|
|
ALLOWED_COMMENTS.forEach(function(rule) {
|
|
TYPES.push(rule)
|
|
})
|
|
return {
|
|
contains: TYPES,
|
|
keywords: LITERALS,
|
|
illegal: '\\S'
|
|
};
|
|
}; |