v2.0版本开发,新增专业版编辑器和预览组件
This commit is contained in:
parent
88b3eeb8ca
commit
1e7686ee10
10
.babelrc
Normal file → Executable file
10
.babelrc
Normal file → Executable file
@ -1,6 +1,10 @@
|
||||
{
|
||||
"presets": [
|
||||
["env", { "modules": false }],
|
||||
"stage-3"
|
||||
presets: [
|
||||
[
|
||||
'@babel/preset-env',
|
||||
{
|
||||
modules: false
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
11
.editorconfig
Executable file → Normal file
11
.editorconfig
Executable file → Normal file
@ -1,16 +1,9 @@
|
||||
# http://editorconfig.org
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[Makefile]
|
||||
indent_style = tab
|
||||
trim_trailing_whitespace = true
|
||||
|
@ -1,4 +1,3 @@
|
||||
# Created by .ignore support plugin (hsz.mobi)
|
||||
src/markdown/font/*.js
|
||||
src/doc.js
|
||||
src/markdown/js/hljs.js
|
||||
/config/
|
||||
/src/assets/
|
||||
|
448
.eslintrc.json
448
.eslintrc.json
@ -18,5 +18,453 @@
|
||||
},
|
||||
"plugins": [
|
||||
"vue"
|
||||
],
|
||||
"rules": {
|
||||
"linebreak-style": [
|
||||
"error",
|
||||
"unix"
|
||||
],
|
||||
"quotes": [
|
||||
2,
|
||||
"single"
|
||||
],
|
||||
"generator-star-spacing": 0,
|
||||
"consistent-return": 0,
|
||||
"no-alert": 2,
|
||||
"no-caller": 2,
|
||||
"no-debugger": 2,
|
||||
"no-else-return": [
|
||||
0
|
||||
],
|
||||
"no-nested-ternary": 0,
|
||||
//禁止使用嵌套的三目运算
|
||||
"no-cond-assign": 2,
|
||||
//禁止在条件表达式中使用赋值语句
|
||||
"arrow-parens": 0,
|
||||
"no-class-assign": 2,
|
||||
//禁止给类赋值
|
||||
"no-const-assign": 2,
|
||||
//禁止修改const声明的变量
|
||||
"no-constant-condition": 2,
|
||||
//禁止在条件中使用常量表达式 if(true) if(1)
|
||||
"no-control-regex": 2,
|
||||
//禁止在正则表达式中使用控制字符
|
||||
"no-debugger": 2,
|
||||
//禁止使用debugger
|
||||
"no-delete-var": 1,
|
||||
//不能对var声明的变量使用delete操作符
|
||||
"no-div-regex": 1,
|
||||
//不能使用看起来像除法的正则表达式/=foo/
|
||||
"no-dupe-keys": 2,
|
||||
//在创建对象字面量时不允许键重复 {a:1,a:1}
|
||||
"no-dupe-args": 2,
|
||||
//函数参数不能重复
|
||||
"no-duplicate-case": 2,
|
||||
//switch中的case标签不能重复
|
||||
"no-empty": 2,
|
||||
//块语句中的内容不能为空
|
||||
"no-empty-character-class": 2,
|
||||
//正则表达式中的[]内容不能为空
|
||||
"no-empty-label": 0,
|
||||
//禁止使用空label
|
||||
"no-eq-null": 2,
|
||||
//禁止对null使用==或!=运算符
|
||||
"no-eval": 1,
|
||||
//禁止使用eval
|
||||
"no-ex-assign": 2,
|
||||
//禁止给catch语句中的异常参数赋值
|
||||
"no-extra-parens": 0,
|
||||
"no-extend-native": 2,
|
||||
//禁止扩展native对象
|
||||
"no-extra-bind": 2,
|
||||
//禁止不必要的函数绑定
|
||||
"no-extra-boolean-cast": 2,
|
||||
//禁止不必要的bool转换
|
||||
"no-extra-semi": 2,
|
||||
//禁止多余的冒号
|
||||
"no-fallthrough": 1,
|
||||
//禁止switch穿透
|
||||
"no-floating-decimal": 2,
|
||||
//禁止省略浮点数中的0 .5 3.
|
||||
"no-func-assign": 2,
|
||||
//禁止重复的函数声明
|
||||
"no-implicit-coercion": 1,
|
||||
//禁止隐式转换
|
||||
"no-implied-eval": 2,
|
||||
//禁止使用隐式eval
|
||||
"no-inline-comments": 0,
|
||||
//禁止行内备注
|
||||
"no-inner-declarations": [
|
||||
2,
|
||||
"functions"
|
||||
],
|
||||
//禁止在块语句中使用声明(变量或函数)
|
||||
"no-invalid-regexp": 2,
|
||||
//禁止无效的正则表达式
|
||||
"no-invalid-this": 2,
|
||||
//禁止无效的this,只能用在构造器,类,对象字面量
|
||||
"no-irregular-whitespace": 2,
|
||||
//不能有不规则的空格
|
||||
"no-iterator": 2,
|
||||
//禁止使用__iterator__ 属性
|
||||
"no-label-var": 2,
|
||||
//label名不能与var声明的变量名相同
|
||||
"no-labels": 2,
|
||||
//禁止标签声明
|
||||
"no-lone-blocks": 2,
|
||||
//禁止不必要的嵌套块
|
||||
"no-lonely-if": 0,
|
||||
//禁止else语句内只有if语句
|
||||
"no-loop-func": 1,
|
||||
//禁止在循环中使用函数(如果没有引用外部变量不形成闭包就可以)
|
||||
"no-mixed-requires": [
|
||||
0,
|
||||
false
|
||||
],
|
||||
//声明时不能混用声明类型
|
||||
"no-mixed-spaces-and-tabs": [
|
||||
0,
|
||||
false
|
||||
],
|
||||
//禁止混用tab和空格
|
||||
"no-multi-spaces": 1,
|
||||
//不能用多余的空格
|
||||
"no-multi-str": 2,
|
||||
//字符串不能用\换行
|
||||
"no-multiple-empty-lines": [
|
||||
1,
|
||||
{
|
||||
"max": 2
|
||||
}
|
||||
],
|
||||
//空行最多不能超过2行
|
||||
"no-native-reassign": 2,
|
||||
//不能重写native对象
|
||||
"no-negated-in-lhs": 2,
|
||||
//in 操作符的左边不能有!
|
||||
"no-new": 0,
|
||||
//禁止在使用new构造一个实例后不赋值
|
||||
"no-new-func": 1,
|
||||
//禁止使用new Function
|
||||
"no-new-object": 1,
|
||||
//禁止使用new Object()
|
||||
"no-new-require": 2,
|
||||
//禁止使用new require
|
||||
"no-new-wrappers": 1,
|
||||
//禁止使用new创建包装实例,new String new Boolean new Number
|
||||
"no-obj-calls": 2,
|
||||
//不能调用内置的全局对象,比如Math() JSON()
|
||||
"no-octal": 2,
|
||||
//禁止使用八进制数字
|
||||
"no-octal-escape": 2,
|
||||
//禁止使用八进制转义序列
|
||||
"no-param-reassign": 2,
|
||||
//禁止给参数重新赋值
|
||||
"no-proto": 2,
|
||||
//禁止使用__proto__属性
|
||||
"no-redeclare": 2,
|
||||
//禁止重复声明变量
|
||||
"no-regex-spaces": 2,
|
||||
//禁止在正则表达式字面量中使用多个空格 /foo bar/
|
||||
"no-return-assign": 1,
|
||||
//return 语句中不能有赋值表达式
|
||||
"no-script-url": 0,
|
||||
//禁止使用javascript:void(0)
|
||||
"no-self-compare": 2,
|
||||
//不能比较自身
|
||||
"no-sequences": 0,
|
||||
//禁止使用逗号运算符
|
||||
"no-shadow": 2,
|
||||
//外部作用域中的变量不能与它所包含的作用域中的变量或参数同名
|
||||
"no-shadow-restricted-names": 2,
|
||||
//严格模式中规定的限制标识符不能作为声明时的变量名使用
|
||||
"no-spaced-func": 2,
|
||||
//函数调用时 函数名与()之间不能有空格
|
||||
"no-sparse-arrays": 2,
|
||||
//禁止稀疏数组, [1,,2]
|
||||
"no-trailing-spaces": 1,
|
||||
//一行结束后面不要有空格
|
||||
"no-throw-literal": 2,
|
||||
//禁止抛出字面量错误 throw "error";
|
||||
"no-undef": 1,
|
||||
//不能有未定义的变量
|
||||
"no-undef-init": 2,
|
||||
//变量初始化时不能直接给它赋值为undefined
|
||||
"no-undefined": 2,
|
||||
//不能使用undefined
|
||||
"no-unexpected-multiline": 2,
|
||||
//避免多行表达式
|
||||
"no-underscore-dangle": 1,
|
||||
//标识符不能以_开头或结尾
|
||||
"no-unneeded-ternary": 2,
|
||||
//禁止不必要的嵌套 var isYes = answer === 1 ? true : false;
|
||||
"no-unreachable": 2,
|
||||
//不能有无法执行的代码
|
||||
"no-unused-expressions": 2,
|
||||
//禁止无用的表达式
|
||||
"no-unused-vars": [
|
||||
2,
|
||||
{
|
||||
"vars": "all",
|
||||
"args": "after-used"
|
||||
}
|
||||
],
|
||||
//不能有声明后未被使用的变量或参数
|
||||
"no-use-before-define": 2,
|
||||
//未定义前不能使用
|
||||
"no-useless-call": 2,
|
||||
//禁止不必要的call和apply
|
||||
"no-void": 2,
|
||||
//禁用void操作符
|
||||
"no-var": 0,
|
||||
//禁用var,用let和const代替
|
||||
"no-warning-comments": [
|
||||
1,
|
||||
{
|
||||
"terms": [
|
||||
"todo",
|
||||
"fixme",
|
||||
"xxx"
|
||||
],
|
||||
"location": "start"
|
||||
}
|
||||
],
|
||||
//不能有警告备注
|
||||
"no-with": 2,
|
||||
//禁用with
|
||||
"array-bracket-spacing": [
|
||||
2,
|
||||
"never"
|
||||
],
|
||||
//是否允许非空数组里面有多余的空格
|
||||
"brace-style": [
|
||||
1,
|
||||
"1tbs"
|
||||
],
|
||||
//大括号风格
|
||||
"callback-return": 0,
|
||||
//避免多次调用回调什么的
|
||||
// "camelcase": 2,//强制驼峰法命名
|
||||
"comma-style": [
|
||||
2,
|
||||
"last"
|
||||
],
|
||||
//逗号风格,换行时在行首还是行尾
|
||||
"complexity": [
|
||||
0,
|
||||
11
|
||||
],
|
||||
//循环复杂度
|
||||
"computed-property-spacing": [
|
||||
0,
|
||||
"never"
|
||||
],
|
||||
//是否允许计算后的键名什么的
|
||||
"consistent-this": [
|
||||
2,
|
||||
"that"
|
||||
],
|
||||
//this别名
|
||||
"constructor-super": 0,
|
||||
//非派生类不能调用super,派生类必须调用super
|
||||
"curly": [
|
||||
2,
|
||||
"all"
|
||||
],
|
||||
//必须使用 if(){} 中的{}
|
||||
"default-case": 2,
|
||||
//switch语句最后必须有default
|
||||
"dot-location": 0,
|
||||
//对象访问符的位置,换行的时候在行首还是行尾
|
||||
"dot-notation": [
|
||||
0,
|
||||
{
|
||||
"allowKeywords": true
|
||||
}
|
||||
],
|
||||
//避免不必要的方括号
|
||||
"eol-last": 0,
|
||||
//文件以单一的换行符结束
|
||||
"eqeqeq": 2,
|
||||
//必须使用全等
|
||||
"func-names": 0,
|
||||
//函数表达式必须有名字
|
||||
"func-style": [
|
||||
0,
|
||||
"declaration"
|
||||
],
|
||||
//函数风格,规定只能使用函数声明/函数表达式
|
||||
"id-length": 0,
|
||||
//变量名长度
|
||||
"indent": [
|
||||
2,
|
||||
4
|
||||
],
|
||||
//缩进风格
|
||||
"init-declarations": 0,
|
||||
//声明时必须赋初值
|
||||
"key-spacing": [
|
||||
0,
|
||||
{
|
||||
"beforeColon": false,
|
||||
"afterColon": false
|
||||
}
|
||||
],
|
||||
//对象字面量中冒号的前后空格
|
||||
"lines-around-comment": 0,
|
||||
//行前/行后备注
|
||||
"max-depth": [
|
||||
0,
|
||||
4
|
||||
],
|
||||
//嵌套块深度
|
||||
"max-len": [
|
||||
0,
|
||||
80,
|
||||
4
|
||||
],
|
||||
//字符串最大长度
|
||||
"max-nested-callbacks": [
|
||||
0,
|
||||
2
|
||||
],
|
||||
//回调嵌套深度
|
||||
"max-params": [
|
||||
0,
|
||||
3
|
||||
],
|
||||
//函数最多只能有3个参数
|
||||
"max-statements": [
|
||||
0,
|
||||
10
|
||||
],
|
||||
//函数内最多有几个声明
|
||||
"new-cap": 2,
|
||||
//函数名首行大写必须使用new方式调用,首行小写必须用不带new方式调用
|
||||
"new-parens": 2,
|
||||
//new时必须加小括号
|
||||
"newline-after-var": 0,
|
||||
//变量声明后是否需要空一行
|
||||
"object-curly-spacing": [
|
||||
0,
|
||||
"never"
|
||||
],
|
||||
//大括号内是否允许不必要的空格
|
||||
"object-shorthand": 0,
|
||||
//强制对象字面量缩写语法
|
||||
"one-var": 0,
|
||||
//连续声明
|
||||
"operator-assignment": [
|
||||
0,
|
||||
"always"
|
||||
],
|
||||
//赋值运算符 += -=什么的
|
||||
"operator-linebreak": [
|
||||
2,
|
||||
"after"
|
||||
],
|
||||
//换行时运算符在行尾还是行首
|
||||
"padded-blocks": 0,
|
||||
//块语句内行首行尾是否要空行
|
||||
"prefer-const": 0,
|
||||
//首选const
|
||||
"prefer-spread": 0,
|
||||
//首选展开运算
|
||||
"prefer-reflect": 0,
|
||||
//首选Reflect的方法
|
||||
"quote-props": [
|
||||
0,
|
||||
"always"
|
||||
],
|
||||
//对象字面量中的属性名是否强制双引号
|
||||
"radix": 2,
|
||||
//parseInt必须指定第二个参数
|
||||
"id-match": 2,
|
||||
//命名检测
|
||||
"require-yield": 0,
|
||||
//生成器函数必须有yield
|
||||
"semi": [
|
||||
0,
|
||||
"always"
|
||||
],
|
||||
//语句强制分号结尾
|
||||
"semi-spacing": [
|
||||
0,
|
||||
{
|
||||
"before": false,
|
||||
"after": true
|
||||
}
|
||||
],
|
||||
//分号前后空格
|
||||
"sort-vars": 0,
|
||||
//变量声明时排序
|
||||
"space-after-keywords": [
|
||||
0,
|
||||
"always"
|
||||
],
|
||||
//关键字后面是否要空一格
|
||||
"space-before-blocks": [
|
||||
0,
|
||||
"always"
|
||||
],
|
||||
//不以新行开始的块{前面要不要有空格
|
||||
"space-before-function-paren": [
|
||||
0,
|
||||
"always"
|
||||
],
|
||||
//函数定义时括号前面要不要有空格
|
||||
"space-in-parens": [
|
||||
0,
|
||||
"never"
|
||||
],
|
||||
//小括号里面要不要有空格
|
||||
"space-infix-ops": 0,
|
||||
//中缀操作符周围要不要有空格
|
||||
"space-return-throw-case": 0,
|
||||
//return throw case后面要不要加空格
|
||||
"space-unary-ops": [
|
||||
0,
|
||||
{
|
||||
"words": true,
|
||||
"nonwords": false
|
||||
}
|
||||
],
|
||||
//一元运算符的前/后要不要加空格
|
||||
"spaced-comment": 0,
|
||||
//注释风格要不要有空格什么的
|
||||
"strict": 2,
|
||||
//使用严格模式
|
||||
"use-isnan": 2,
|
||||
//禁止比较时使用NaN,只能用isNaN()
|
||||
"valid-jsdoc": 0,
|
||||
//jsdoc规则
|
||||
"valid-typeof": 2,
|
||||
//必须使用合法的typeof的值
|
||||
"vars-on-top": 2,
|
||||
//var必须放在作用域顶部
|
||||
"wrap-iife": [
|
||||
2,
|
||||
"inside"
|
||||
],
|
||||
//立即执行函数表达式的小括号风格
|
||||
"wrap-regex": 0,
|
||||
//正则表达式字面量用小括号包起来
|
||||
"vue/name-property-casing": "off",
|
||||
"vue/html-self-closing": "off",
|
||||
"indent": "off",
|
||||
"vue/script-indent": [
|
||||
"error",
|
||||
4,
|
||||
{
|
||||
"baseIndent": 1
|
||||
}
|
||||
],
|
||||
"vue/html-indent": [
|
||||
"error",
|
||||
4,
|
||||
{
|
||||
"baseIndent": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
30
.gitignore
vendored
Normal file → Executable file
30
.gitignore
vendored
Normal file → Executable file
@ -1,14 +1,20 @@
|
||||
.DS_Store
|
||||
node_modules/
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
|
||||
# Editor directories and files
|
||||
.idea
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
/build/
|
||||
.vscode/
|
||||
.cache/
|
||||
coverage/
|
||||
dist/
|
||||
!dist/index.html
|
||||
node_modules/
|
||||
*.log
|
||||
|
||||
# OS generated files
|
||||
.DS_Store
|
||||
.DS_Store?
|
||||
._*
|
||||
.Spotlight-V100
|
||||
.Trashes
|
||||
ehthumbs.db
|
||||
Thumbs.db
|
||||
|
||||
.vscode
|
||||
.idea
|
||||
/docs/.vuepress/dist/
|
||||
|
28
.project
28
.project
@ -1,28 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>markdown-vue</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>com.aptana.ide.core.unifiedBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>com.aptana.projects.webnature</nature>
|
||||
</natures>
|
||||
<filteredResources>
|
||||
<filter>
|
||||
<id>1529661132631</id>
|
||||
<name></name>
|
||||
<type>26</type>
|
||||
<matcher>
|
||||
<id>org.eclipse.ui.ide.multiFilter</id>
|
||||
<arguments>1.0-name-matches-false-false-node_modules</arguments>
|
||||
</matcher>
|
||||
</filter>
|
||||
</filteredResources>
|
||||
</projectDescription>
|
46
App.vue
Executable file
46
App.vue
Executable file
@ -0,0 +1,46 @@
|
||||
<template>
|
||||
<div>
|
||||
<Markdown
|
||||
v-model="val"
|
||||
@on-ready="onReady"
|
||||
@on-copy="onCopy"
|
||||
@on-paste-image="onPasteImage"
|
||||
@on-save="onSave"
|
||||
:height="500"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import Markdown from './dist/simple';
|
||||
import Markdown from 'vue-meditor';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Markdown
|
||||
},
|
||||
data: function () {
|
||||
return {
|
||||
val: ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onReady(data) {
|
||||
console.log(data)
|
||||
},
|
||||
onCopy(text) {
|
||||
console.log(text);
|
||||
},
|
||||
onPasteImage(file) {
|
||||
console.log(file)
|
||||
},
|
||||
onSave(data) {
|
||||
console.log(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
|
||||
</style>
|
453
README.md
Normal file → Executable file
453
README.md
Normal file → Executable file
@ -1,68 +1,127 @@
|
||||
# vue-Markdown编辑器
|
||||
## 简介
|
||||
一款使用marked和highlight.js开发的一款markdown编辑器,除常见markdown语法外,支持快捷输入、图片粘贴、代码复制、全屏编辑、预览等功能。
|
||||
|
||||
[在线示例地址](https://zhaoxuhui1122.github.io/vue-markdown/)
|
||||
使用起来简单方便,只需几行代码,即可在你的页面上引入一个markdown编辑器,编辑区支持像专业编辑器那样。
|
||||
|
||||
GitHub :[https://github.com/zhaoxuhui1122/vue-markdown]( https://github.com/zhaoxuhui1122/vue-markdown)
|
||||
编辑器涵盖了常用的markdown编辑器功能,可通过已有属性进行配置,对编辑器功能和样式进行基本的配置,也可根据需求进行深度定制。
|
||||
#### [项目地址](https://github.com/zhaoxuhui1122/vue-markdown)
|
||||
#### [文档地址]([https://zhaoxuhui1122.github.io/vue-markdown-docs/)
|
||||
**示例**
|
||||
![image.png](https://upload-images.jianshu.io/upload_images/9390764-f6b0840eca057d61.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
|
||||
|
||||
### 1.简介
|
||||
## 特点
|
||||
- 使用简单,只需要安装npm包,引入项目即可使用,不需要繁琐的初始化配置。
|
||||
- 方便扩展,根据实际需求,支持常见的功能配置,也可根据实际需求进行深度定制。
|
||||
- 体积小,加载速度快,npm包删除了highlight.js和codemirror里的依赖。
|
||||
- 灵活的主题,默认支持四种代码块风格,也可根据实际需求定制自己的主题样式
|
||||
- 功能强大,支持专业版的编辑器,使用codemirror实现编辑窗口,可识别markdown语法
|
||||
- 键盘事件监听,如保存、粘贴、回车时上次输入语法判断等
|
||||
- 可扩展性强,除了提供的属性配置编辑器,也可直接在原有组件基础上进行二次开发
|
||||
|
||||
**一款使用marked和highlight.js开发的一款markdown编辑器,目前只支持在vue项目中使用。**
|
||||
## 实现思路
|
||||
|
||||
**编辑器涵盖了常用的markdown编辑器功能,工具栏可自定义配置,也可进行二次开发。**
|
||||
通过监听文本输入区域内内容的变化,实时将输入的markdown语法进行编译,并渲染到预览区域。
|
||||
|
||||
编辑器大致分为头部菜单栏、左侧内容输入区域、右侧预览区域三个部分。
|
||||
头部菜单主要为定自定义标题区域和菜单按钮,菜单按钮可通过配置文件进行显示和隐藏;左侧编辑区域,简单版使用textarea开发,满足基本需求,
|
||||
专业版使用codemirror开发,编辑区域支持手动输入文本和通过头部菜单插入;右侧预览区域可实时预览输入文本,并可通过菜单按钮,进行编辑区域和预览区域的切换。
|
||||
|
||||
**效果**
|
||||
![image](http://smalleyes.oss-cn-shanghai.aliyuncs.com/WechatIMG586.png)
|
||||
|
||||
### 2.安装
|
||||
## 安装方式
|
||||
### 使用npm安装
|
||||
|
||||
1. 安装依赖
|
||||
```
|
||||
npm i -S vue-meditor
|
||||
|
||||
或
|
||||
|
||||
直接复制对应的组件到项目目录内 (推荐)
|
||||
```
|
||||
|
||||
### 3.在项目中使用
|
||||
|
||||
|
||||
### 将组件复制到项目内
|
||||
1. 将git仓库代码拉到本地
|
||||
```
|
||||
git clone https://github.com/zhaoxuhui1122/vue-markdown.git
|
||||
```
|
||||
import MarkDown from 'vue-meditor'
|
||||
|
||||
...
|
||||
components:{
|
||||
MarkDown
|
||||
}
|
||||
...
|
||||
2. 复制src文件夹下内容至components文件夹下
|
||||
|
||||
## 在项目使用
|
||||
#### npm包安装时
|
||||
简单版
|
||||
```js
|
||||
import Markdown from 'vue-meditor'
|
||||
```
|
||||
专业版
|
||||
```js
|
||||
import { MarkdownPro } from 'vue-meditor'
|
||||
```
|
||||
预览组件
|
||||
```js
|
||||
import { MarkdownPreview } from 'vue-meditor'
|
||||
```
|
||||
#### 复制组件到本地时(推荐)
|
||||
简单版
|
||||
```js
|
||||
import Markdown from '@/components/markdown/...';
|
||||
```
|
||||
专业版
|
||||
```js
|
||||
import MarkdownPro from '@/components/markdown/pro';
|
||||
```
|
||||
预览组件
|
||||
```js
|
||||
import MarkdownPreview from '@/components/markdown/preview';
|
||||
```
|
||||
|
||||
#### 在页面内使用
|
||||
```vue
|
||||
<template>
|
||||
<mark-down/>
|
||||
<div class="markdown">
|
||||
<Markdown/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Markdown from 'vue-meditor';
|
||||
|
||||
export default {
|
||||
name: "markdown",
|
||||
components: {
|
||||
Markdown
|
||||
}
|
||||
}
|
||||
</script>
|
||||
```
|
||||
## API
|
||||
### 编辑器基本属性
|
||||
#### value
|
||||
- Type: `String/Number`
|
||||
- Default: `''`
|
||||
|
||||
### 4.props
|
||||
编辑器输入的文本,支持通过`v-dodel`数据双向绑定设置编辑器内容和获取编辑器的值。
|
||||
|
||||
名称 | 类型|说明|默认值
|
||||
---|---|---|---
|
||||
initialValue|String|编辑器初始化内容
|
||||
width|Number|编辑器宽度|
|
||||
height|Number|编辑器高度,单位 px|600
|
||||
theme|String|代码块主题配置,共有四个值,分别为Light、Dark、OneDark、GitHub|Light
|
||||
autoSave|Boolean|是否自动保存|true
|
||||
interval|Number|自动保存频率,单位毫秒|10000
|
||||
toolbars|Object|工具栏配置,具体功能详见工具栏功能配置表
|
||||
exportFileName|String|导出文件的名称|未命名文件
|
||||
#### width
|
||||
- Type: `String/Number`
|
||||
- Default: `auto`
|
||||
|
||||
### 5.events
|
||||
编辑器的初始化宽度。
|
||||
|
||||
名称 | 说明
|
||||
---|---
|
||||
on-save|自动保存或者手动保存时触发,返回当前编辑器内原始输入内容和转以后的内容
|
||||
on-paste-image|粘贴图片,返回当前粘贴的file文件
|
||||
### 6.工具栏配置
|
||||
#### height
|
||||
- Type: `Number`
|
||||
- Default: `600`
|
||||
|
||||
名称 | 说明 | 默认显示
|
||||
编辑器的初始化高度。
|
||||
|
||||
#### bordered
|
||||
- Type: `Boolean`
|
||||
- Default: `true`
|
||||
|
||||
编辑器是否含有边框。
|
||||
|
||||
#### toolbars
|
||||
- Type: `Object`
|
||||
- Default: `参见下表`
|
||||
|
||||
头部菜单按钮,通过设置true or false控制决定是否显示,目前配置支持持控制按钮显示隐藏,后续将支持根据配置显示排列顺序。
|
||||
|
||||
名称 | 说明 | 默认是否显示
|
||||
---|---|---
|
||||
strong|粗体|是
|
||||
italic|斜体|是
|
||||
@ -83,74 +142,286 @@ image|image|是
|
||||
table |表格|是
|
||||
checked|已完成列表|是
|
||||
notChecked |未完成列表|是
|
||||
shift|预览|是
|
||||
preview|预览|是
|
||||
split|分屏模式切换|是
|
||||
print |打印|否
|
||||
theme|主题切换|是
|
||||
fullscreen |全屏|是
|
||||
exportmd|导出为*.md文件|是
|
||||
importmd|导入本地*.md文件|是
|
||||
save|保存按钮|否
|
||||
clear|清空内容|否
|
||||
|
||||
### 7.其他说明
|
||||
**关于保存时返回值**
|
||||
|
||||
#### theme
|
||||
- Type: `String`
|
||||
- Default: `light`
|
||||
|
||||
编辑器代码块主题,目前支持`light`、`dark`、`oneDark`、`gitHub`四种代码块风格,可通过自定义theme并修改样式文件进行主题定制。
|
||||
|
||||
自定义theme时,预览区域的会增加一个为`markdown-theme-[theme]`的`class`。
|
||||
|
||||
|
||||
#### autoSave
|
||||
- Type: `Boolean`
|
||||
- Default: `false`
|
||||
|
||||
是否开启自动保存,设置为开启时可通过绑定`on-save`事件获取编辑器内的值和代码块主题。
|
||||
```vue
|
||||
<Markdown @on-save="handleOnSave"/>
|
||||
```
|
||||
value // 编辑器输入的原始内容
|
||||
html // 右侧现实的问转义后的内容
|
||||
theme // 保存时的主题名字
|
||||
```
|
||||
**标题配置**
|
||||
|
||||
```
|
||||
支持配置编辑器名称,提供了name=title的slot插槽
|
||||
```
|
||||
|
||||
|
||||
**工具栏配置**
|
||||
|
||||
```
|
||||
// 例:
|
||||
const config = {
|
||||
print:false // 隐藏掉打印功能
|
||||
```js
|
||||
handleOnSave({value, theme}){
|
||||
console.log(value, theme);
|
||||
}
|
||||
<MarkDown :toolbars="config"/>
|
||||
```
|
||||
**优化代码体积**
|
||||
#### interval
|
||||
- Type: `Number`
|
||||
- Default: `10000`
|
||||
|
||||
自动保存间隔时间,单位:`mm`,默认10000mm,需要`autoSave = true`时才有效。
|
||||
|
||||
#### exportFileName
|
||||
- Type: `String`
|
||||
- Default: `unnamed`
|
||||
|
||||
导出的md文件名称,默认unnamed.md。
|
||||
|
||||
#### markedOptions
|
||||
- Type: `Object`
|
||||
- Default: `{}`
|
||||
|
||||
marked配置项,可以根据需求自定义。
|
||||
|
||||
```vue
|
||||
<Markdown :markedOptions="{baseUrl:'http://***.oss-cn-shanghai.aliyuncs.com/'}"/>
|
||||
```
|
||||
#### isPreview
|
||||
- Type: `Boolean`
|
||||
- Default: `false`
|
||||
|
||||
是否是预览模式,开启时可作为一个预览组件使用,与预览组件功能一致。
|
||||
|
||||
#### copyCode
|
||||
- Type: `Boolean`
|
||||
- Default: `true`
|
||||
|
||||
是否支持复制代码块内的内容。
|
||||
|
||||
#### copyBtnText
|
||||
- Type: `String`
|
||||
- Default: `复制代码`
|
||||
|
||||
复制代码按钮显示文字。
|
||||
|
||||
|
||||
### 预览组件基本属性
|
||||
#### initialValue
|
||||
- Type: `String/Number`
|
||||
- Default: `''`
|
||||
|
||||
预览组件初始化内容,支持动态更新。
|
||||
|
||||
#### theme
|
||||
- Type: `String`
|
||||
- Default: `light`
|
||||
|
||||
代码块主题,与编辑器编辑器代码块主题一致。
|
||||
|
||||
#### markedOptions
|
||||
- Type: `Object`
|
||||
- Default: `{}`
|
||||
|
||||
marked配置项,与编辑器内该配置一致。
|
||||
|
||||
#### copyCode
|
||||
- Type: `Boolean`
|
||||
- Default: `true`
|
||||
|
||||
是否支持复制代码块内的内容。
|
||||
|
||||
|
||||
#### copyBtnText
|
||||
- Type: `String`
|
||||
- Default: `复制代码`
|
||||
|
||||
复制代码按钮显示文字。
|
||||
### on-ready
|
||||
编辑器初始化完成时触发,返回值为`Object`,包含组件本身和`insertContent`方法。
|
||||
|
||||
#### on-save
|
||||
编辑器保存事件,自动保存或者手动保存时触发,支持`ctrl+s`或`command+s`触发保存,返回值类型为`Object`,包含当前输入值`value`和选择的代码块主题`theme`。
|
||||
|
||||
|
||||
#### on-paste-image
|
||||
|
||||
监听编辑器粘贴图片事件,在编辑区域内手动粘贴图片时触发,可用于支持粘贴插入图片文件,返回`file`文件,上传文件后可结合`on-ready`事件内返回的`insertContent`插入图片。
|
||||
|
||||
#### on-copy
|
||||
复制代码块内容,触发时返回当前代码块的text,copyCode开启时才有效。
|
||||
|
||||
## 二次开发
|
||||
### 粘贴插入图片
|
||||
|
||||
`on-paste-image`虽然可以支持图片粘贴事件的监听,但不会处理图片上传至服务器并将链接插入编辑器这段逻辑。
|
||||
|
||||
目前如果想要支持粘贴插入图片,需要在`on-paste-image`方法里上传图片文件,拿到图片地址后,使用`on-ready`方法里返回的insertContent方法插入图片。
|
||||
|
||||
上述操作显得过于复杂,可以直接在源码里扩展mixins里的`handlePaste`方法,图片上传完成后,直接调用`this.insertContent`方法插入图片。
|
||||
|
||||
修改`/markdown/mixins/common.js`
|
||||
|
||||
```js
|
||||
handlePaste(_, e) {// 粘贴图片
|
||||
const { clipboardData = {} } = e;
|
||||
const { types = [], items } = clipboardData;
|
||||
let item = null;
|
||||
for (let i = 0; i < types.length; i++) {
|
||||
if (types[i] === 'Files') {
|
||||
item = items[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (item) {
|
||||
const file = item.getAsFile();
|
||||
if (/image/gi.test(file.type)) {
|
||||
e.preventDefault();
|
||||
// 1.上传操作
|
||||
// 2.插入图片 this.insertContent(`![image](imgUrl)`)
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
项目中为了达到代码高亮显示,需要用到highlight.js,
|
||||
由于highlight.js体积过于庞大,项目中按需加载了部分常用的程序语言,
|
||||
可根据需求自行配置,配置目录位于/markdown/js/hljs内
|
||||
### 支持流程图、甘特图等语法
|
||||
|
||||
目前编辑器只支持常见code语法,如果需要实现如流程图等功能,需要进一步扩展,以实现一个简单的流程图为例,具体实现思路如下:
|
||||
|
||||
默认情况下,markedjs会使用renderer.code方法对输入的代码块进行解析,并会借助`highlight.js`支持语法高亮。
|
||||
可以将流程图语法输入到代码块内,并标明语言,重写marked.Renderer的code解析方法,结合结合`flowchart.js`路程图代码进行解析,返回文本内容。
|
||||
|
||||
修改`/markdown/libs/js/simple.js
|
||||
|
||||
```js
|
||||
import hljs from './hljs';
|
||||
import index from 'index';
|
||||
import {parse} from 'flowchart.js'
|
||||
|
||||
hljs.initHighlightingOnLoad();
|
||||
|
||||
const renderer = new index.Renderer();
|
||||
renderer.code = (code, language) => {
|
||||
if (language === 'flow') {// 流程图
|
||||
const dom = document.createElement('div');
|
||||
const flowchart = parse(code);
|
||||
flowchart.drawSVG(dom, {/*相关配置*/});
|
||||
return dom.innerHTML;
|
||||
} else {// 默认解析
|
||||
return `<pre class="hljs"><code class="${language}">${hljs.highlightAuto(code).value}</code></pre>`
|
||||
}
|
||||
}
|
||||
export default index.setOptions({
|
||||
renderer,
|
||||
gfm: true,
|
||||
tables: true,
|
||||
breaks: false,
|
||||
pedantic: false,
|
||||
sanitize: false,
|
||||
smartLists: true,
|
||||
highlight: function (code) {
|
||||
return hljs.highlightAuto(code).value;
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
### 自定义markdown语法转换
|
||||
|
||||
### 更新日志
|
||||
**1.3.0**
|
||||
- 支持配置marked的markedOptions,感谢[dkvirus](https://github.com/dkvirus)提出的[issues#12](https://github.com/zhaoxuhui1122/vue-markdown/issues/12)和具体的解决办法
|
||||
项目内使用的`index.js均为其默认配置功能,如需要特殊转换,可重写其内部的解析方法,即重写其renderer相关方法
|
||||
[参考文档](https://github.com/markedjs/marked/blob/master/docs/USING_PRO.md)。
|
||||
|
||||
**1.2.1**
|
||||
- 支持theme、width、heigh动态切换
|
||||
## 自动生成文档目录
|
||||
|
||||
**v1.2.0**
|
||||
- 优化代码体积,按需加载highlight.js,较少了三分之二的代码体积
|
||||
- 新增图片粘贴功能
|
||||
- 增加图片预览功能
|
||||
- 修复部分bug
|
||||
预览区域和文档预览组件暂不支持自动生成目录,实现自动生成目录思路目前想到的大致有
|
||||
- 重写`renderer.heading` 方法,为生成的标题添加id,输入特定快捷键,如`[TOC]`时,查找预览区域内的的所有标题标签,分析等级关系,生成目录标签
|
||||
|
||||
**v0.9.3**
|
||||
### icon替换
|
||||
项目内所有的icon和命名参考`/assets/font/index.html`,替换时需注意,预览区域的checkbox为icon,注意一并替换,
|
||||
修改`/assets/css/index.less`内的`input[type="checkbox"]`的`:after`样式。
|
||||
|
||||
- 解决初始化值initialValue无法动态改变的问题
|
||||
- 修改了打包配置
|
||||
|
||||
**v0.8.0**
|
||||
|
||||
- 新增md文件导出和读取功能
|
||||
- 修改预览部分样式
|
||||
- 修改头部菜单样式
|
||||
|
||||
**v0.7.0**
|
||||
|
||||
- 修复主题无法更新的问题
|
||||
- 修复文档初始化值无法动态切换的问题
|
||||
## 代码体积优化
|
||||
|
||||
|
||||
### 公共代码提取
|
||||
npm包构建时,三个组件完全独立,没有抽离公共文件,所以,当同一个项目内引入其中的两个或三个组件都引入时,存在一定的重复代码,
|
||||
主要为`highlight.js`、`marked`、`iconfont`、css样式几个部分。
|
||||
|
||||
解决方式:将组件复制到本地项目,打包时将这些文件作为公共文件抽离出来。
|
||||
|
||||
**注意**:三个组件中使用的iconfont为同一套,如果只是单纯的使用`preview`组件,
|
||||
将会引入整个项目所使用的iconfont,可删除iconfont的引入,
|
||||
重写`input[type="checkbox"]`的样式,preview组件体积将会减少一半,样式文件位于`markdown/assets/css/index.less`。
|
||||
|
||||
### codemirror体积优化
|
||||
codemirror主要分为主文件、mode相关文件和样式文件,主文件体积异常的大,mode文件目前只选用了css/jsvascript/markdown/meta/xml五个文件,
|
||||
其中markdown.js和meta.js为必须引用的,项目中已将常见的编程语言代码风格定义为css/js/xml之一,例如less/sass/scss按照css规则解析,html/vue按照xml规则解析。
|
||||
优化可从一下方面入手
|
||||
- 减少codemirror主文件体积
|
||||
- 减少引用的mode依赖
|
||||
|
||||
### highlight.js体积优化
|
||||
|
||||
highlight.js原本体积也是较大的,主要原因为,编译时为支持各种代码语言,引入了相应的解析文件,
|
||||
项目内已根据常见的代码语言进行了一次筛选,进行按需引入,可根据自身需求,再次对引用文件进行删减
|
||||
|
||||
参见`src/markdown/libs/js/hljs.js`,目前支持的语言有
|
||||
```js
|
||||
import hljs from 'highlight.js/lib/highlight'
|
||||
|
||||
import javascript from 'highlight.js/lib/languages/javascript'
|
||||
import java from 'highlight.js/lib/languages/java';
|
||||
import css from 'highlight.js/lib/languages/css';
|
||||
import less from 'highlight.js/lib/languages/less';
|
||||
import go from 'highlight.js/lib/languages/go';
|
||||
import markdown from src;
|
||||
import php from 'highlight.js/lib/languages/php';
|
||||
import python from 'highlight.js/lib/languages/python';
|
||||
import ruby from 'highlight.js/lib/languages/ruby';
|
||||
import stylus from 'highlight.js/lib/languages/stylus';
|
||||
import typescript from 'highlight.js/lib/languages/typescript';
|
||||
import xml from 'highlight.js/lib/languages/xml';
|
||||
|
||||
const languages = {
|
||||
javascript,
|
||||
java,
|
||||
css,
|
||||
less,
|
||||
markdown,
|
||||
go,
|
||||
php,
|
||||
python,
|
||||
ruby,
|
||||
stylus,
|
||||
typescript,
|
||||
xml
|
||||
}
|
||||
Object.keys(languages).forEach(key => {
|
||||
hljs.registerLanguage(key, languages[key])
|
||||
})
|
||||
|
||||
export default hljs;
|
||||
```
|
||||
|
||||
### 专业版编辑器codemirror/simple.js
|
||||
优化思路:无
|
||||
#### iconfont 体积优化
|
||||
只需要preview组件时,避免引入所有icon,参考功能扩展里icon替换方法。
|
||||
|
||||
## 升级路线
|
||||
- 普通版编辑器对选中文本进行操作功能
|
||||
- 文档目录功能
|
||||
- 优化专业版编辑器体积
|
||||
- react版开发
|
||||
- ...
|
||||
|
||||
## 问题反馈
|
||||
|
||||
对于功能上的缺陷、使用方法和希望扩展的功能,可以提 [Issues](https://github.com/zhaoxuhui1122/vue-markdown/issues)。
|
||||
|
67
config/webpack.base.config.js
Normal file
67
config/webpack.base.config.js
Normal file
@ -0,0 +1,67 @@
|
||||
const path = require('path');
|
||||
const VueLoaderPlugin = require('vue-loader/lib/plugin');
|
||||
const resolve = dir => path.resolve(__dirname, dir)
|
||||
|
||||
const config = {
|
||||
entry: resolve('../main.js'),
|
||||
output: {
|
||||
path: resolve('../dist/'),
|
||||
filename: 'simple.js'
|
||||
},
|
||||
module: {
|
||||
rules: [{
|
||||
test: /\.(js|vue)$/,
|
||||
loader: 'eslint-loader',
|
||||
enforce: 'pre',
|
||||
include: [resolve('src'), resolve('test')]
|
||||
}, {
|
||||
test: /\.vue$/,
|
||||
loader: 'vue-loader'
|
||||
},
|
||||
{
|
||||
test: /\.js$/,
|
||||
use: 'babel-loader',
|
||||
exclude: /node_modules/
|
||||
},
|
||||
{
|
||||
test: /\.(css|less)$/,
|
||||
use: [
|
||||
'vue-style-loader',
|
||||
'css-loader',
|
||||
'less-loader'
|
||||
]
|
||||
},
|
||||
{
|
||||
test: /\.(jpg|png|jpeg)$/,
|
||||
use: {
|
||||
loader: 'url-loader',
|
||||
options: {
|
||||
// placeholder
|
||||
name: '[name]_[hash].[ext]',
|
||||
outputPath: 'img/',
|
||||
limit: 4096
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
test: /\.(woff2?|eot|ttf|otf|dtd|svg)(\?.*)?$/,
|
||||
loader: 'url-loader',
|
||||
options: {
|
||||
limit: 10240,
|
||||
name: 'fonts/[name].[hash:7].[ext]'
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
'vue$': 'vue/dist/vue.esm.js'
|
||||
},
|
||||
extensions: ['*', '.js', '.vue', '.json']
|
||||
},
|
||||
plugins: [
|
||||
new VueLoaderPlugin()
|
||||
]
|
||||
};
|
||||
|
||||
module.exports = config;
|
45
config/webpack.config.js
Normal file
45
config/webpack.config.js
Normal file
@ -0,0 +1,45 @@
|
||||
const {CleanWebpackPlugin} = require('clean-webpack-plugin');
|
||||
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
||||
const ProgressBarPlugin = require('progress-bar-webpack-plugin');
|
||||
const {BundleAnalyzerPlugin} = require('webpack-bundle-analyzer');
|
||||
const CopyPlugin = require('copy-webpack-plugin');
|
||||
const path = require('path');
|
||||
const merge = require('webpack-merge');
|
||||
const baseConfig = require('./webpack.base.config');
|
||||
|
||||
const resolve = dir => path.resolve(__dirname, dir);
|
||||
const analyzerPlugins = process.env.analyzer==='1'?[new BundleAnalyzerPlugin({analyzerPort:5555})]:[];
|
||||
|
||||
const devConfig = {
|
||||
mode: 'production',
|
||||
entry: {
|
||||
simple: resolve('../src/simple.js'),
|
||||
pro: resolve('../src/pro.js'),
|
||||
preview: resolve('../src/preview.js')
|
||||
},
|
||||
output: {
|
||||
path: resolve('../dist/'),
|
||||
filename: '[name].js',
|
||||
libraryTarget: 'umd',
|
||||
libraryExport: 'default',
|
||||
library: 'makdown',
|
||||
umdNamedDefine: true,
|
||||
globalObject: 'typeof self !== \'undefined\' ? self : this'
|
||||
},
|
||||
plugins: [
|
||||
...analyzerPlugins,
|
||||
new CleanWebpackPlugin(),
|
||||
new ProgressBarPlugin({
|
||||
width: 100,
|
||||
clear: false
|
||||
}),
|
||||
new CopyPlugin([
|
||||
{from: resolve('../index.js'), to: resolve('../dist/')}
|
||||
]),
|
||||
],
|
||||
performance: {
|
||||
hints: false
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = merge(baseConfig, devConfig);
|
29
config/webpack.dev.config.js
Normal file
29
config/webpack.dev.config.js
Normal file
@ -0,0 +1,29 @@
|
||||
const webpack = require('webpack');
|
||||
var HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
const path = require('path');
|
||||
const merge = require('webpack-merge');
|
||||
const baseConfig = require('./webpack.base.config');
|
||||
const resolve = dir => path.resolve(__dirname, dir)
|
||||
|
||||
const devConfig = {
|
||||
mode: 'development',
|
||||
devtool: 'cheap-module-eval-source-map',
|
||||
devServer: {
|
||||
// open: true,
|
||||
hot: true,
|
||||
hotOnly: true
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['.js', '.vue', '.json'],
|
||||
alias: {
|
||||
'vue$': 'vue/dist/vue.esm.js'
|
||||
}
|
||||
},
|
||||
plugins: [
|
||||
new HtmlWebpackPlugin({
|
||||
template: resolve('../index.dev.html')
|
||||
}),
|
||||
new webpack.HotModuleReplacementPlugin()
|
||||
]
|
||||
};
|
||||
module.exports = merge(baseConfig, devConfig);
|
6
dist/build.js
vendored
6
dist/build.js
vendored
File diff suppressed because one or more lines are too long
BIN
dist/iconfont.eot
vendored
BIN
dist/iconfont.eot
vendored
Binary file not shown.
107
dist/iconfont.svg
vendored
107
dist/iconfont.svg
vendored
@ -1,107 +0,0 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
||||
<!--
|
||||
2013-9-30: Created.
|
||||
-->
|
||||
<svg>
|
||||
<metadata>
|
||||
Created by iconfont
|
||||
</metadata>
|
||||
<defs>
|
||||
|
||||
<font id="iconfont" horiz-adv-x="1024" >
|
||||
<font-face
|
||||
font-family="iconfont"
|
||||
font-weight="500"
|
||||
font-stretch="normal"
|
||||
units-per-em="1024"
|
||||
ascent="896"
|
||||
descent="-128"
|
||||
/>
|
||||
<missing-glyph />
|
||||
|
||||
<glyph glyph-name="fujian" unicode="" d="M874.7 722.4q32.4-32.4 48.15-72.45t15.75-82.35-15.75-82.35-48.15-72.45l-344.7-342q-32.4-32.4-79.65-54t-99.9-25.2-107.55 14.4-101.7 64.8q-45.9 45.9-63.9 99.45t-14.4 106.65 24.75 99.9 53.55 79.2l306 303.3q8.1 8.1 23.85 4.05t23.85-12.15q7.2-8.1 11.7-23.85t-3.6-23.85l-305.1-302.4q-24.3-24.3-40.5-56.7t-18.9-69.3 10.8-74.7 48.6-72.9q31.5-31.5 69.75-44.55t76.05-10.8 72 16.65 58.5 38.7l343.8 341.1q24.3 24.3 34.65 50.4t9.9 51.75-12.15 49.95-32.4 45q-38.7 37.8-86.85 35.55t-96.75-50.85l-310.5-308.7q-20.7-20.7-20.25-45.9t16.65-41.4q19.8-19.8 45.45-16.2t41.85 19.8l281.7 279.9q8.1 8.1 23.85 4.05t23.85-12.15 12.6-23.85-3.6-23.85l-282.6-279.9q-32.4-32.4-62.1-45t-55.8-11.25-48.6 13.95-41.4 30.6q-15.3 14.4-27.45 36.9t-13.95 49.5 9.45 57.6 43.65 62.1q16.2 16.2 28.8 29.7 10.8 11.7 20.25 20.7t10.35 9.9l251.1 250.2q32.4 32.4 70.65 50.85t77.85 21.15 77.85-10.8 70.65-45.9z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="md" unicode="" d="M471.289899 141.73866699999996c-6.827051 16.384-16.043051 37.205333-27.648 62.464-10.923008 25.258667-22.869683 52.565333-35.839991 81.92-12.970995 29.354667-26.965649 59.392-41.984 90.112-14.336286 31.402667-27.989606 60.757333-40.96 88.064-12.970914 27.989333-25.258901 52.906667-36.864 74.752-10.92288 21.841067-19.797538 38.5664-26.624 50.176-7.509521-80.554667-13.653517-167.936-18.432-262.144-4.778842-93.525333-8.874837-188.074667-12.288-283.648l-97.28 0c2.730581 61.44 5.80259 123.221333 9.216 185.344 3.413248 62.805333 7.167915 124.245333 11.264 184.32 4.778573 60.757333 9.557235 119.808 14.336 177.152 5.461222 57.339733 11.263885 111.611733 17.408 162.816l87.04 0c18.431774-30.0416 38.229086-65.540267 59.392-106.496 21.162377-40.964267 42.325022-83.972267 63.488-129.024 21.162313-44.373333 41.642274-89.088 61.439991-134.144 19.796949-44.373333 37.887573-84.992 54.272-121.856 16.383531 36.864 34.474197 77.482667 54.272 121.856 19.796821 45.056 40.276821 89.770667 61.44 134.144 21.162112 45.051733 42.324736 88.059733 63.488 129.024 21.162027 40.955733 40.95936 76.4544 59.392 106.496l87.04 0c22.126421-218.018133 38.979968-435.549867 50.560683-667.84 0.56704-11.370667 44.931072 2.005333 45.472853-9.412267l-82.925739-85.713067-109.592363 85.713067c-0.523093 14.647467 50.366165-3.114667 49.810987 11.485867-3.06816 80.661333-6.62464 160.5888-10.670421 239.7824-4.779349 94.208-10.923349 181.589333-18.432 262.144-6.827349-11.6096-16.043349-28.334933-27.648-50.176-10.923307-21.845333-22.869973-46.762667-35.84-74.752-12.971264-27.306667-26.965931-56.661333-41.984-88.064-14.336555-30.72-27.989888-60.757333-40.96-90.112-12.971179-29.354667-25.259179-56.661333-36.864-81.92-10.923179-25.258667-19.797803-46.08-26.624-62.464l-79.872 0" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="checked-false" unicode="" d="M837.91129067 746.24712c9.45807787 0 18.40968747-3.7428448 25.206624-10.53978133 6.79693653-6.79693653 10.53978133-15.74854613 10.53978133-25.206624l0-652.727456c0-9.45807787-3.7428448-18.40968747-10.53978133-25.206624-6.79693653-6.79693653-15.74854613-10.53978133-25.206624-10.53978134L185.18383467 22.026853329999994c-9.45807787 0-18.40968747 3.7428448-25.206624 10.53978134-6.79693653 6.79693653-10.53978133 15.74854613-10.53978134 25.206624L149.43742933 710.49962347c0 9.45807787 3.7428448 18.40968747 10.53978134 25.206624 6.79693653 6.79693653 15.74854613 10.53978133 25.206624 10.53978133L837.91129067 746.24602773M837.91129067 792.09123733L185.18383467 792.09123733c-44.8748416 0-81.59052267-36.71568107-81.59052267-81.59052266l0-652.727456c0-44.8748416 36.71568107-81.59052267 81.59052267-81.59052267l652.727456 0c44.8748416 0 81.59052267 36.71568107 81.59052266 81.59052267L919.50181333 710.49962347C919.50181333 755.37446507 882.78613227 792.09123733 837.91129067 792.09123733L837.91129067 792.09123733z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="on" unicode="" d="M932 654L92 654c-33.135 0-60-26.865-60-60l0-420c0-33.135 26.865-60 60-60l840 0c33.135 0 60 26.865 60 60L992 594C992 627.135 965.135 654 932 654zM947 204c0-33.135-11.865-45-45-45L122 159c-33.135 0-45 11.865-45 45L77 564c0 33.135 11.865 45 45 45l780 0c33.135 0 45-11.865 45-45L947 204zM842 564L602 564c-33.135 0-60-26.865-60-60l0-240c0-33.135 26.865-60 60-60l240 0c33.135 0 60 26.865 60 60L902 504C902 537.135 875.135 564 842 564z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="off" unicode="" d="M932 654L92 654c-33.135 0-60-26.865-60-60l0-420c0-33.135 26.865-60 60-60l840 0c33.135 0 60 26.865 60 60L992 594C992 627.135 965.135 654 932 654zM947 204c0-33.135-11.865-45-45-45L122 159c-33.135 0-45 11.865-45 45L77 564c0 33.135 11.865 45 45 45l780 0c33.135 0 45-11.865 45-45L947 204zM422 564L182 564c-33.135 0-60-26.865-60-60l0-240c0-33.135 26.865-60 60-60l240 0c33.135 0 60 26.865 60 60L482 504C482 537.135 455.135 564 422 564z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="yanse" unicode="" d="M190.35392 343.57557333m-26.88 0a26.25 26.25 0 1 1 53.76 0 26.25 26.25 0 1 1-53.76 0ZM246.99392 479.34453333m-42.15456 0a41.1665625 41.1665625 0 1 1 84.30912 0 41.1665625 41.1665625 0 1 1-84.30912 0ZM414.98144 589.8136533300001m-54.39456 0a53.1196875 53.1196875 0 1 1 108.78912 0 53.1196875 53.1196875 0 1 1-108.78912 0ZM634.66496 589.8136533300001m-68.31456 0a66.7134375 66.7134375 0 1 1 136.62912 0 66.7134375 66.7134375 0 1 1-136.62912 0ZM980.85344 656.35125333l-0.7248 0.62976c-10.00608 8.69088-25.16544 7.62432-33.85632-2.38272L584.2784 237.78645332999997l-45.76224-89.9808 82.09824 57.15168 362.62272 417.5376C991.928 632.50197333 990.86048 647.6613333299999 980.85344 656.35125333zM918.83552 424.53333333c-12.87456 0-23.42016-9.9408-24.3984-22.5648l-0.08064 0.00576c0 0-33.92064-179.84064-181.76064-275.83968-159.50016-103.57056-342.07872-56.9616-375.9984 2.87808-18.63936 32.88288-47.04 88.32-63.19968 101.76096-43.39584 36.09408-153.12-13.92-176.16 40.8-42.82176 101.7024 58.24032 365.28 308.80032 430.56 175.3008 46.46592 324.56736-9.50976 399.43872-71.88l0 0.0096c4.152-3.5424 9.53568-5.68608 15.42144-5.68608 13.1328 0 23.77824 10.64544 23.77824 23.77824 0 7.88352-3.83904 14.86752-9.74784 19.19424C803.3984 694.0542933300001 604.4912 846.17397333 326.6768 721.3336533300001c-303.36-136.32-322.56-420.48-259.2-491.52s156.09408-14.84736 176.64-38.4c13.12032-15.04032 30.21408-54.96576 52.63968-91.20096 32.47968-52.47936 194.92416-162.68352 442.7184-15.67872 148.69824 88.21536 201.91968 291.35904 203.83968 313.59936l-0.0816 0.00672c0.04896 0.63168 0.0816 1.26912 0.0816 1.91328C943.31552 413.57301333 932.3552 424.53333333 918.83552 424.53333333z" horiz-adv-x="1037" />
|
||||
|
||||
|
||||
<glyph glyph-name="download" unicode="" d="M391.38165448 725.93326272l240.95928598 0 0-64.1844201-240.95928598 0 0 64.1844201ZM391.38165448 788.7264396l240.95928598 0 0-33.48092532-240.95928598 0 0 33.48092532ZM861.69471958 252.86553432999995L833.07556085 93.04951446999996 190.59307034 93.04951446999996 162.00173642 252.86553432999995 90.5339419 252.86553432999995 90.5339419-1.8628535200000442 933.85644986-1.8628535200000442 933.85644986 252.86553432999995ZM843.99050449 537.55120495L632.34094046 537.55120495 632.34094046 629.63133654 391.38165448 629.63133654 391.38165448 536.8294444 182.40918149 536.8294444 511.15260556 176.78976975Z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="close" unicode="" d="M822.00345 119.17756599999996l0.022513 0.022513L246.50423 694.6829250000001c-5.78782 5.791913-13.785981 9.374508-22.621207 9.374508-17.662265 0-31.980365-14.3181-31.980365-31.980365 0-8.834202 3.582595-16.832364 9.373485-22.620184L776.11226 74.66067599999997c5.838985-6.277984 14.166651-10.209526 23.416316-10.209526 17.662265 0 31.980365 14.3181 31.980365 31.980365C831.508941 105.33223299999997 827.871087 113.37951299999997 822.00345 119.17756599999996zM776.783549 694.551942l-0.022513 0.022513L201.278189 119.05272200000002c-5.791913-5.78782-9.374508-13.785981-9.374508-22.621207 0-17.662265 14.3181-31.980365 31.980365-31.980365 8.834202 0 16.832364 3.582595 22.620184 9.373485l574.797231 574.836117c6.277984 5.838985 10.209526 14.166651 10.209526 23.416316 0 17.662265-14.3181 31.980365-31.980365 31.980365C790.628882 704.057433 782.580578 700.41958 776.783549 694.551942z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="group" unicode="" d="M34.45656213 145.22855360000005l397.95204694 0L432.408608 622.7725376000001 34.45656213 622.7725376000001 34.45656213 145.22855360000005zM87.5167616 569.71233813l291.83055467 0 0-371.4224928-291.83055467 0L87.5167616 569.71233813zM591.58920853 622.7725376000001l0-477.543984 397.95313814 0L989.54234667 622.7725376000001 591.58920853 622.7725376000001zM936.4832384 198.28875413000003l-291.83055467 0L644.65268373 569.71233813l291.83055467 0L936.4832384 198.28875413000003zM565.0585632 808.48378347c0 29.302032-23.73088 53.06020053-53.05910827 53.06020053-29.27583573 0-53.06020053-23.75816853-53.06020053-53.06020053 0-19.63110613 10.68167893-36.75934187 26.53064533-45.93689707L485.46989973 5.454204799999957c-15.8489664-9.17755627-26.53064533-26.3068832-26.53064533-45.93689707 0-29.3031232 23.7843648-53.06020053 53.06020053-53.06020053 29.32822827 0 53.05910827 23.75816853 53.05910827 53.06020053 0 19.63983787-10.66748907 36.77571413-26.53064533 45.95108694L538.5279168 762.5326965300001C554.39107307 771.70697813 565.0585632 788.8428544 565.0585632 808.48378347z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="img" unicode="" d="M427.6145024 231.03597014000002L349.16493547 339.57724800999995C338.77152641 353.95736426999997 321.92075947 353.95721601 311.52745601 339.57724800999995L166.90305387 139.47777068000005C156.5096448 125.09765333999997 162.71110507 113.44053226999995 180.7541664 113.44053226999995L443.41864427 113.44053226999995 843.36921812 113.44053226999995C861.4224096 113.44053226999995 867.48577707 125.07215999000005 856.99141332 139.42049921L627.80094081 452.779408C617.23710081 467.22273919 600.2918496 467.1277472 589.79748587 452.779408L427.6145024 231.03597014000002 427.6145024 231.03597014000002ZM257.35579521 559.0678912000001a62.29333333 62.29333333 0 1 1 127.32210239 0 62.29333333 62.29333333 0 1 1-127.32210239 0ZM82.22029653 718.22051947L941.77970453 718.22051947C932.83477333 718.22051947 925.79683307 725.3427648100001 925.79683307 734.07920001L925.79683307 33.92079998999998C925.79683307 42.675572269999975 932.86973547 49.77948053 941.77970453 49.77948053L82.22029653 49.77948053C91.16522667 49.77948053 98.20316693 42.65723519000005 98.20316693 33.92079998999998L98.20316693 734.07920001C98.20316693 725.32442773 91.1302656 718.22051947 82.22029653 718.22051947ZM34.54211628 33.92079998999998C34.54211628 7.666775479999956 55.83539627-13.88157013 82.22029653-13.88157013L941.77970453-13.88157013C968.0912512-13.88157013 989.45788372 7.578731729999959 989.45788372 33.92079998999998L989.45788372 734.07920001C989.45788372 760.3332245199999 968.16460373 781.88157013 941.77970453 781.88157013L82.22029653 781.88157013C55.9087488 781.88157013 34.54211628 760.42126827 34.54211628 734.07920001L34.54211628 33.92079998999998Z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="strong" unicode="" d="M270.528 1.5359999999999445V766.4639999999999h224.704c67.136 0 120.768-16.064 160.896-48.128 40.256-32.064 60.224-74.624 60.224-127.616 0-42.176-11.904-79.36-35.776-111.616-23.872-32.256-56.768-55.168-98.496-68.672v-1.984c52.032-5.888 93.504-25.6 124.608-59.008s46.72-75.84 46.72-127.104c0-65.856-23.616-119.104-70.848-159.744-47.232-40.704-107.776-60.992-181.504-60.992H270.528zM369.28 680v-239.488h89.856c47.744 0 85.184 11.648 112.32 34.816 27.2 23.232 40.768 55.424 40.768 96.576 0 72.064-48.064 108.16-144.192 108.16H369.28z m0-325.376v-266.624h118.528c51.648 0 91.584 11.968 119.68 35.776 28.096 23.872 42.24 57.088 42.24 99.52 0 87.552-59.392 131.392-178.24 131.392H369.28z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="italic" unicode="" d="M529.86255689 686.13901881c3.17041097 15.82995963 0.67384989 27.45111514-7.63328765 34.97393593-8.28504494 7.5228208-25.17549033 12.83629586-50.46144746 16.00670683-11.09091393 2.37504665-16.60323006 8.69377339-16.60323005 18.96723041 0 2.35295277 0.38663585 4.9157929 1.25932683 7.72166188 0.77327042 2.75063491 1.55758845 6.11988697 2.33085887 10.07461464 23.71732241-2.36399906 46.9817286-4.14252247 69.94787316-5.34661653 22.95509827-1.14886 44.27528016-1.77852341 64.03787359-1.77852212 16.61427636 0 36.78559952 0.62966341 60.41454768 1.77852212 23.72836869 1.20409277 46.31892499 2.99366247 67.63910688 5.34661653 1.53549456-7.90945667 2.30876628-13.84154884 2.30876629-17.79627652 0-11.04672615-5.47917596-16.98986592-16.59218376-17.75209006-25.28595715-3.18145726-43.02699962-8.73796115-53.35568941-16.59218377-10.25136183-7.90945667-16.97881834-19.77364101-20.14922928-35.60359934L515.67855995 76.77948738999999c-3.19250356-15.82995963-0.38663585-27.25227405 8.29609124-34.38846029 8.6716808-7.10304476 26.41272325-12.64850238 53.3556894-16.59218375 10.22926924-2.37504665 15.41018358-8.30713883 15.41018359-17.75208876 0-4.78323218-0.83955078-11.09091393-2.39713924-18.96723041a1387.5240922 1387.5240922 0 0 1-72.25663816 5.30242877 1364.38120044 1364.38120044 0 0 1-66.4681543 1.7785234c-16.59218377 0-36.57571215-0.57442935-59.82907074-1.7785234-23.34173284-1.14886-45.63402752-2.949476-66.95421069-5.30242877-1.6349151 7.87631649-2.41923312 14.18399693-2.41923312 18.96723041 0 9.44495123 4.750092 14.99040754 14.19504452 16.59218247 25.37433139 3.95472769 43.51305602 9.64379231 54.59292235 17.17766069 10.99149339 7.5338671 18.13872462 19.14397761 21.30913558 34.97393594l117.34937651 609.34848512z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="overline" unicode="" d="M837.8784338 392.6585736h-651.7568676a27.61681602 27.61681602 0 1 1 0-55.23363334h651.7568676a27.61681602 27.61681602 0 1 1 0 55.23363334zM642.50602786 31.309099859999947c-29.74883513 3.32506427-55.68654829 8.08620386-68.2466764 14.39388431-12.57117442 6.27454027-23.59580798 17.00091221-23.59580798 32.23434862V293.23803435h-88.37381311v-215.30070156c0-15.23343638-4.28612948-25.78305985-17.50906121-31.73724592s-33.51576802-10.91416543-63.28669702-14.89098701c-6.60594207-1.3145609-9.32343681-6.62803595-9.32343681-15.86309981 0-4.63962516 0.91687873-10.25136183 2.27562481-16.8462576 21.14343469 1.3145609 43.93283205 2.46341959 68.09202309 3.46867258a1716.09792816 1716.09792816 0 0 0 141.91729601 0c23.45220097-1.01629929 45.78868212-2.15411168 66.96525698-3.46867258 1.29246701 6.60594207 1.99945709 12.20663245 1.99945708 16.8462576 0 10.58276364-3.63437348 15.86309981-10.91416544 15.86309981zM224.48684676 623.9217942099999a12.15139967 12.15139967 0 0 1 6.42919486 6.93734386 656.28602594 656.28602594 0 0 0 22.80044368 43.65666433c7.29083955 12.53803424 15.88519239 22.81148996 25.80515373 30.73199292 9.89786746 7.94259684 21.64053738 11.40022183 35.21696479 15.36599712 13.53223964 3.96577526 30.24593782 3.44657869 50.0748116 3.44657869H462.28973037v-287.21489162h88.37381311v287.21489162h111.67135817c19.82887378 0 36.53152438 0.51919658 50.07481162-3.44657869 13.55433353-3.95472769 25.10920996-8.6716808 34.74195597-16.61427765a109.78236923 109.78236923 0 0 0 25.26386326-30.10232951 442.53186655 442.53186655 0 0 0 21.83937845-43.33630882c1.3145609-3.31401797 3.62332589-5.46812965 6.92629757-6.78268926 3.32506427-1.3256072 6.29663415-1.90003654 8.93680224-1.90003783 3.96577526 0 7.44549414 0.69594378 10.41706274 2.02155095 2.98261618 1.3256072 6.10883937 2.67330827 9.43390493 3.98786917-7.29083955 22.46904187-12.40547351 42.99385943-15.388091 61.50817362a997.55255074 997.55255074 0 0 1-8.43969824 46.61718533c-2.65121438 12.56012813-5.45708336 22.31438726-8.41760566 29.26277871-2.98261618 6.93734386-7.78794224 10.40601645-14.39388559 10.40601646-5.29138246 0-12.08511932-0.3424481-20.3259765-1.0052517-8.28504494-0.66280359-17.34336031-1.3256072-27.27436793-1.98841079-9.91996004-0.66280359-19.85096767-2.05469115-29.74883512-2.72854103-9.91996004-0.66280359-18.83466839-1.71224305-26.77726525-1.71224306H347.93401634c-8.58330656 0-17.840463 1.06048575-27.74937675 1.71224306-9.94205392 0.67384989-19.67422048 1.69014917-29.27382502 2.35295276-9.57751195 0.67384989-18.68001508 1.51340197-27.27436795 2.17620428-8.58330656 0.66280359-15.21134251 1.09362593-19.82887507 1.09362593-6.62803595 0-11.41126813-3.28087779-14.39388431-9.88681987-2.96052229-6.62803595-5.77743757-16.00670683-8.41760565-28.24647944-2.65121438-12.22872633-5.63383056-27.60576973-8.93680224-46.10903763-3.32506427-18.51431419-8.28504494-39.65774886-14.890987-63.46344422 5.30242877-3.96577526 11.56592274-5.95418606 18.85676227-5.95418477 2.65121438 0.01104629 5.45708336 0.66280359 8.46179214 1.99945708z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="exit-full-screen" unicode="" d="M142.4 799.2l-44.8-44.8 173.6-174.4-68-68H384V692.8l-67.2-67.2zM752.8 580l173.6 174.4-44.8 44.8-174.4-173.6-67.2 67.2V512h180.8zM270.4 188.79999999999995l-169.6-170.4 44.8-49.6 170.4 174.4 68-68V256H203.2zM820.8 256H640v-180.8l68 68 170.4-174.4 44.8 49.6-169.6 170.4z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="horizontal" unicode="" d="M962.23301298 384c0-28.40586801-23.07976821-51.48563623-51.48563622-51.48563623l-804.59622112 0c-28.40586801 0-51.48563623 23.07976821-51.48563623 51.48563623s23.07976821 51.48563623 51.48563623 51.48563623L910.74737676 435.48563623c28.40586801 0 51.48563623-23.07976821 51.48563622-51.48563623z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="quote" unicode="" d="M310.726085 360.026512h151.998727v-290.768856H171.941361V326.98420899999996c-8.876637 162.934578 72.698904 286.334186 244.522282 370.071112l66.084604-99.123259c-110.173443-57.307705-167.481148-136.606312-171.825811-237.90555h0.003649z m370.084491 0h152.001159v-290.768856h-290.783451V326.98420899999996c-8.883935 162.934578 72.696471 286.334186 244.519849 370.071112l66.087038-99.123259c-114.611762-61.754538-171.824595-141.054361-171.824595-237.90555z m0 0" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="table" unicode="" d="M513.7 775.9h385.5c44.3 0 59.5-15 59.5-59 0-221.1 0-442.3-0.1-663.4 0-44.6-14.8-59.6-58.8-59.6-259.2-0.1-518.5-0.1-777.7 0-41 0-57.1 15.7-57.1 56.8-0.2 223.4-0.2 446.8 0 670.1 0 39.6 16.2 55 56.5 55.1 130.7 0.1 261.4 0 392.2 0zM345.3 202.79999999999995h-222v-150.7h222V202.79999999999995z m277-151.6V202.10000000000002H401.5v-150.9h220.8z m55.9 1.2h222.2V202.5H678.2v-150.1zM123.6 405.1v-149.4h221V405.1h-221zM678 253.70000000000005c72.4 0 142.3-0.2 212.2 0.5 3.8 0 10.7 6.6 10.7 10.3 0.7 46.7 0.5 93.3 0.5 139.8H677.9c0.1-50.4 0.1-98.7 0.1-150.6z m-277.5 1.8h222.1V404.4H400.5v-148.9z m-55.7 200.9V606.6H121.9c0-46.8-0.5-91.5 0.6-136.1 0.1-4.8 9.2-13.4 14.2-13.5 68.6-0.9 137.3-0.6 208.1-0.6z m56.3 2.1h221V607.2h-221v-148.7z m498.8-0.7V607.3H678.5v-149.5h221.4z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="preview" unicode="" d="M510.72 226.88c-90.24 0-164.8 73.06666667-164.8 164.8s74.45333333 163.30666667 164.8 163.30666667 164.8-73.06666667 164.8-164.8-73.17333333-163.30666667-164.8-163.30666667z m0 277.97333333c-63.04 0-113.17333333-50.13333333-113.17333333-113.17333333s50.13333333-113.17333333 113.17333333-113.17333333 113.17333333 50.13333333 113.17333333 113.17333333-50.13333333 113.17333333-113.17333333 113.17333333zM787.94666667 592.3199999999999m-26.66666667 0a26.66666667 26.66666667 0 1 1 53.33333333 0 26.66666667 26.66666667 0 1 1-53.33333333 0ZM896.32 526.0799999999999l-38.4-34.24c37.86666667-42.66666667 59.73333333-81.6 59.73333333-100.90666667 0-55.89333333-183.36-276.48-406.93333333-276.48S103.78666667 336.53333333 103.78666667 390.93333333s183.36 276.48 406.93333333 276.48c97.70666667 0 187.84-42.24 258.24-94.29333333l33.70666667 41.28c-79.46666667 61.01333333-181.33333333 109.01333333-291.94666667 109.01333333C258.56 723.41333333 52.26666667 474.13333333 52.26666667 390.93333333c0-110.29333333 206.29333333-332.37333333 458.45333333-332.37333333s458.45333333 249.28 458.45333333 332.37333333c0 29.97333333-26.77333333 81.49333333-72.85333333 135.14666667zM879.68 505.92m-25.81333333 0a25.81333333 25.81333333 0 1 1 51.62666666 0 25.81333333 25.81333333 0 1 1-51.62666666 0Z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="full-screen" unicode="" d="M611.03217778 453.90506667c-8.73813333 0-14.56355555 2.91271111-20.38897778 8.73813333-11.65084445 11.65084445-11.65084445 29.12711111 0 40.77795555l250.49315555 250.49315556c11.65084445 11.65084445 29.12711111 11.65084445 40.77795556 0s11.65084445-29.12711111 0-40.77795556l-250.49315556-250.49315555c-5.82542222-5.82542222-14.56355555-8.73813333-20.38897777-8.73813333zM867.35075555 573.32622222c-17.47626667 0-29.12711111 11.65084445-29.1271111 29.12711111V710.2236444499999h-107.77031112c-17.47626667 0-29.12711111 11.65084445-29.12711111 29.1271111s11.65084445 29.12711111 29.12711111 29.12711112h136.89742222c17.47626667 0 29.12711111-11.65084445 29.12711112-29.12711112v-136.89742222c0-17.47626667-11.65084445-29.12711111-29.12711112-29.12711111zM159.56195555 5.347555550000038c-8.73813333 0-14.56355555 2.91271111-20.38897777 8.73813334-11.65084445 11.65084445-11.65084445 29.12711111 0 40.77795556l250.49315555 250.49315555c11.65084445 11.65084445 29.12711111 11.65084445 40.77795556 0s11.65084445-29.12711111 0-40.77795555l-250.49315556-250.49315556c-5.82542222-5.82542222-11.65084445-8.73813333-20.38897778-8.73813334zM293.54666667-0.4778666700000258H156.64924445c-17.47626667 0-29.12711111 11.65084445-29.12711112 29.12711112v136.89742222c0 17.47626667 11.65084445 29.12711111 29.12711112 29.12711111s29.12711111-11.65084445 29.1271111-29.12711111v-107.77031112h107.77031112c17.47626667 0 29.12711111-11.65084445 29.12711111-29.1271111s-11.65084445-29.12711111-29.12711111-29.12711112zM861.52533333 2.434844450000014c-8.73813333 0-14.56355555 2.91271111-20.38897778 8.73813333l-250.49315555 250.49315555c-11.65084445 11.65084445-11.65084445 29.12711111 0 40.77795556s29.12711111 11.65084445 40.77795555 0l250.49315556-250.49315556c11.65084445-11.65084445 11.65084445-29.12711111 0-40.77795555-5.82542222-5.82542222-14.56355555-8.73813333-20.38897778-8.73813333zM867.35075555-0.4778666700000258h-136.89742222c-17.47626667 0-29.12711111 11.65084445-29.12711111 29.12711112s11.65084445 29.12711111 29.12711111 29.1271111h107.77031112v107.77031112c0 17.47626667 11.65084445 29.12711111 29.1271111 29.12711111s29.12711111-11.65084445 29.12711112-29.12711111v-136.89742222c0-17.47626667-11.65084445-29.12711111-29.12711112-29.12711112zM412.96782222 453.90506667c-8.73813333 0-14.56355555 2.91271111-20.38897777 8.73813333L139.17297778 713.13635555c-11.65084445 11.65084445-11.65084445 29.12711111 0 40.77795556s29.12711111 11.65084445 40.77795555 0l250.49315556-250.49315556c11.65084445-11.65084445 11.65084445-29.12711111 0-40.77795555-2.91271111-5.82542222-11.65084445-8.73813333-17.47626667-8.73813333zM156.64924445 573.32622222c-17.47626667 0-29.12711111 11.65084445-29.12711112 29.12711111V739.35075555c0 17.47626667 11.65084445 29.12711111 29.12711112 29.12711112h136.89742222c17.47626667 0 29.12711111-11.65084445 29.12711111-29.12711112s-11.65084445-29.12711111-29.12711111-29.1271111H185.77635555v-107.77031112c0-17.47626667-14.56355555-29.12711111-29.1271111-29.12711111z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="checked" unicode="" d="M883.37066667 806.34346667H177.03786667c-43.69066667 0-80.0992-36.4096-80.0992-80.10026667V12.629333330000009c0-43.69066667 36.40853333-80.0992 80.0992-80.0992h713.61493333c43.69066667 0 80.0992 36.40853333 80.0992 80.0992V726.2432c-7.28213333 43.69066667-43.69066667 80.10026667-87.38133333 80.10026667z m29.12746666-786.432c0-14.56426667-14.56426667-29.12746667-29.12746666-29.12746667H177.03786667c-14.5632 0-29.1264 14.5632-29.1264 29.12746667V726.2432c0 14.56426667 14.5632 29.12746667 29.1264 29.12746667h713.61493333c14.5632 0 29.1264-14.5632 29.1264-29.12746667v-706.33173333h-7.28106667zM468.30933333 143.70133333c-14.5632 0-29.12746667 7.28213333-36.40853333 14.5632l-174.76266667 174.76266667c-21.84533333 21.84533333-21.84533333 58.25493333 0 80.10026667 21.84533333 21.84533333 58.25386667 21.84533333 80.0992 0l167.48053334-167.4816c21.84533333-21.84533333 21.84533333-58.25386667 0-80.0992-7.28106667-14.5632-21.84533333-21.84533333-36.40853334-21.84533334zM468.30933333 143.70133333c-14.5632 0-29.12746667 7.28213333-36.40853333 14.5632-29.12746667 29.12746667-29.12746667 58.25493333 0 80.10026667L766.86186667 580.608c21.84533333 21.84533333 58.25493333 21.84533333 80.10026666 0 21.84533333-21.84533333 21.84533333-58.25386667 0-80.0992L504.71786667 158.26453332999995c-7.28106667-7.28106667-21.84533333-14.5632-36.40853334-14.5632z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="clear" unicode="" d="M118.25 110.49999998999999h787.5v-56.25H118.25zM884.70019531 524.30664062L645.11035156 764.40624999a70.76953125 70.76953125 0 0 1-49.86914062 21.09375c-15.99609375 0-31.57910156-5.79199219-43.26855469-17.51660156L135.67871094 350.34472655c-24.609375-24.67089844-22.96582031-66.64746094 3.61230469-93.28710937L229.4140625 166.74999999h395.5078125l263.39941406 264.26953125c24.59179688 24.67089844 22.95703125 66.64746094-3.62109375 93.28710938zM601.55175781 222.99999999H252.72265625l-73.63476563 73.828125c-5.2734375 5.32617188-5.35253906 12.08496094-3.59472656 13.84277344L404.68554687 540.54003905l257.10644532-257.09765625z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="ul" unicode="" d="M149.3 746.7c47.1 0 85.3-38.2 85.3-85.3 0-47.1-38.2-85.3-85.3-85.3S64 614.2 64 661.3c0 47.2 38.2 85.4 85.3 85.4zM149.3 469.3c47.1 0 85.3-38.2 85.3-85.3s-38.2-85.3-85.3-85.3S64 336.9 64 384s38.2 85.3 85.3 85.3zM149.3 192c47.1 0 85.3-38.2 85.3-85.3 0-47.1-38.2-85.3-85.3-85.3S64 59.5 64 106.70000000000005c0 47.1 38.2 85.3 85.3 85.3zM362.7 704h554.7c23.6 0 42.7-19.1 42.7-42.7s-19.1-42.7-42.7-42.7H362.7c-23.6 0-42.7 19.1-42.7 42.7s19.1 42.7 42.7 42.7zM362.7 426.7h554.7c23.6 0 42.7-19.1 42.7-42.7s-19.1-42.7-42.7-42.7H362.7c-23.6 0-42.7 19.1-42.7 42.7s19.1 42.7 42.7 42.7zM362.7 149.29999999999995h554.7c23.6 0 42.7-19.1 42.7-42.7s-19.1-42.7-42.7-42.7H362.7c-23.6 0-42.7 19.1-42.7 42.7s19.1 42.7 42.7 42.7z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="link" unicode="" d="M878 750C812 822 692 822 626 750L524 654c-60-66-66-162-18-234l-30-30c-72 48-168 42-234-18L146 270C74 198 74 84 146 18c72-72 186-72 252 0 0 0 108 108 108 114 48 60 54 150 6 216l30 30c72-48 168-42 228 18 0 0 108 108 108 114 72 72 66 174 0 240z m-420-594l-96-96c-48-48-126-48-168 0-48 48-48 126 0 168L290 324c42 42 102 48 144 18-12-12-12-30 0-42s30-12 42 0c24-42 18-102-18-144z m378 384L740 444c-36-36-96-42-144-18l6 6c12 12 12 30 0 42s-30 6-42-6l-6-6c-30 48-24 108 12 150l96 96c48 48 126 48 168 0 54-48 54-120 6-168z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="code" unicode="" d="M288.145625 154.39312500000005c-7.205625 0-14.431875 2.60625-20.165625 7.865625L45.374375 367.25250000000005a29.806875 29.806875 0 0 0-9.58875 21.890625 29.8125 29.8125 0 0 0 9.58875 21.890625l222.60375 204.995625c12.1275 11.1 30.9375 10.35375 42.05625-1.734375 11.139375-12.088125 10.363125-30.9075-1.725-42.046875L109.458125 389.143125l198.855-183.105c12.088125-11.139375 12.8625-29.95875 1.725-42.046875a29.67375 29.67375 0 0 0-21.8925-9.598125zM735.854375 148.27125c-8.019375 0-16.02 3.225-21.890625 9.598125-11.139375 12.088125-10.363125 30.91875 1.74375 42.046875l198.834375 183.095625-198.855 183.105c-12.088125 11.139375-12.8625 29.95875-1.725 42.046875 11.158125 12.0975 29.949375 12.834375 42.05625 1.734375l222.60375-204.995625a29.75625 29.75625 0 0 0-0.020625-43.78125l-222.6-204.98625a29.664375 29.664375 0 0 0-20.146875-7.86375zM394.20875 48.94124999999997c-3.6225 0-7.303125 0.6675-10.88625 2.071875-15.285 6.015-22.820625 23.285625-16.815 38.58L606.52625 700.18125c6.024375 15.30375 23.24625 22.820625 38.589375 16.805625 15.285-6.015 22.820625-23.285625 16.815-38.58L421.91 67.81875000000002c-4.610625-11.720625-15.826875-18.8775-27.70125-18.8775z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="daoru" unicode="" d="M917.00000001 76.5L917 696.7C917.00000001 755.3 869.3 803 810.7 803l-356 0c-17.6 0-31.9-14.3-31.9-31.9s14.3-31.9 31.9-31.9l356 0c23.4 0 42.5-19.1 42.5-42.5l1e-8-620.2c0-23.4-19.1-42.5-42.5-42.5l-584.50000001 0c-23.4 0-42.5 19.1-42.5 42.5l0 413c0 17.6-14.3 31.9-31.9 31.9s-31.9-14.3-31.9-31.9l0-413c0-58.6 47.7-106.3 106.3-106.3L810.70000001-29.799999999999955c58.6 0 106.3 47.7 106.3 106.3zM352.1 364.79999999999995l-61.4 0c-19.3 0.1-30.00000001-22.3-17.9-37.3l185.3-229.1c9.2-11.4 26.5-11.3 35.7 0.1l205.1 228c12 15 1.39999999 38.3-17.8 38.4L619 364.9c-11.7 0-20.1 8-22.7 19.4C527 688.5 170.4 765.4 145.9 762.8c93.7-99 238.6-199.00000001 229.2-375.7-0.7-12.6-10.5-22.4-23-22.3z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="ol" unicode="" d="M349.29890773 763.63588267h542.33697494a54.23369707 54.23369707 0 0 0 0-108.4673952h-542.33697494a54.23369707 54.23369707 0 0 0 0 108.4673952z m0-325.4021856h542.33697494a54.23369707 54.23369707 0 0 0 0-108.46739414h-542.33697494a54.23369707 54.23369707 0 0 0 0 108.46739414z m0-325.40218454h542.33697494a54.23369707 54.23369707 0 0 0 0-108.4673952h-542.33697494a54.23369707 54.23369707 0 0 0 0 108.4673952zM97.1122144 760.3818602700001v25.48983786a167.03978773 167.03978773 0 0 1 24.9475008 0 35.25190293 35.25190293 0 0 1 18.43945707 10.30440214 33.08255573 33.08255573 0 0 1 7.59271786 13.55842453 31.45554453 31.45554453 0 0 1 0 7.59271787H182.801456v-189.27560427h-40.67527253V760.3818602700001z m0-420.3111552a108.4673952 108.4673952 0 0 0 37.96358827 40.6752736 279.8458784 279.8458784 0 0 1 33.6248928 26.57451093 39.59059947 39.59059947 0 0 1 11.93141333 27.65918613 30.3708704 30.3708704 0 0 1-6.50804373 20.06646827 23.86282667 23.86282667 0 0 1-19.5241312 8.13505387 23.3204896 23.3204896 0 0 1-26.03217494-12.4737504 63.45342613 63.45342613 0 0 1-4.33869546-23.3204896h-35.251904a92.7396224 92.7396224 0 0 0 8.677392 39.59059946 54.23369707 54.23369707 0 0 0 54.23369706 28.7438592 67.7921216 67.7921216 0 0 0 48.26799147-16.81244586 58.5723936 58.5723936 0 0 0 17.89712-44.471632 60.7417408 60.7417408 0 0 0-12.4737504-37.96358827 126.90685227 126.90685227 0 0 0-27.65918613-24.40516373l-15.18543467-10.8467392-19.5241312-14.64309867a42.8446208 42.8446208 0 0 1-8.677392-10.30440213h83.5198944v-33.08255574H86.80781227a90.02793813 90.02793813 0 0 0 8.67739093 37.4212512z m27.11684907-304.2510432a43.38695787 43.38695787 0 0 1 3.7963584-18.98179414 25.48983787 25.48983787 0 0 1 24.9475008-14.10076053 27.65918613 27.65918613 0 0 1 17.35478293 5.4233696 28.2015232 28.2015232 0 0 1 8.13505493 21.6934784 24.9475008 24.9475008 0 0 1-15.18543466 25.48983787 78.0965248 78.0965248 0 0 1-27.11684907 7.0503808v27.11684906a71.58848107 71.58848107 0 0 1 25.48983787 3.7963584 22.23581547 22.23581547 0 0 1 12.4737504 23.32049067 24.9475008 24.9475008 0 0 1-6.50804374 17.89712 23.3204896 23.3204896 0 0 1-17.89712 7.0503808 22.77815253 22.77815253 0 0 1-19.5241312-8.677392 35.79424 35.79424 0 0 1-5.96570666-22.77815253h-35.251904a94.90897067 94.90897067 0 0 0 4.8810336 27.116848 61.28407787 61.28407787 0 0 0 14.6430976 20.60880533 50.97967573 50.97967573 0 0 0 17.354784 10.30440213 76.4695136 76.4695136 0 0 0 24.9475008 2.71168534 66.70744747 66.70744747 0 0 0 44.47163093-14.1007616 47.18331627 47.18331627 0 0 0 16.81244693-37.96358827 42.30228373 42.30228373 0 0 0-10.3044032-28.7438592 34.16722987 34.16722987 0 0 0-13.01608746-9.76206613 27.11684907 27.11684907 0 0 0 14.64309866-8.67739094 47.18331627 47.18331627 0 0 0 14.64309867-36.33657706 61.28407787 61.28407787 0 0 0-16.81244587-42.84462187 64.53810027 64.53810027 0 0 0-49.89500266-18.43945707 60.7417408 60.7417408 0 0 0-54.23369707 26.574512 79.18119787 79.18119787 0 0 0-9.219728 36.87891414z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="save" unicode="" d="M788.69067383 752.15185547h-26.03759766v0.65917969H261.42932128v-0.65917969h-26.03759764c-50.92163086 0-92.20275879-41.19873047-92.2027588-92.12036133v-552.72216797c0-50.92163086 41.28112793-92.12036133 92.2027588-92.12036133h553.29895019c50.92163086 0 92.20275879 41.28112793 92.20275879 92.12036133V660.03149414c0 50.8392334-41.36352539 92.12036133-92.20275879 92.12036133z m-467.93518067-58.58459473H703.16210938v-118.48754882c0-21.83532715-19.03381348-39.55078125-42.51708985-39.55078125H363.272583c-23.48327637 0-42.51708984 17.71545411-42.51708983 39.55078125V693.5672607500001z m501.47094727-575.46386719c0-24.38964844-19.85778809-44.24743653-44.32983399-44.24743652H246.02099609c-24.4720459 0-44.32983398 19.77539063-44.32983398 44.24743652V649.31982422c0 24.38964844 19.85778809 44.24743653 44.32983398 44.24743653h15.32592774V568.5703125c0-50.92163086 40.78674317-92.12036133 91.1315918-92.12036133h318.96057129c50.34484864 0 91.1315918 41.28112793 91.13159179 92.12036133V693.5672607500001h15.24353027c24.4720459 0 44.32983398-19.77539063 44.32983399-44.24743653v-531.21643067zM607.58105469 568.2407226600001c16.31469727 0 29.66308594 13.34838867 29.66308593 29.66308593v32.95898438c0 16.31469727-13.34838867 29.66308594-29.66308593 29.66308594s-29.66308594-13.34838867-29.66308594-29.66308594v-32.95898438c0-16.31469727 13.34838867-29.66308594 29.66308594-29.66308593z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
|
||||
|
||||
</font>
|
||||
</defs></svg>
|
Before Width: | Height: | Size: 33 KiB |
BIN
dist/iconfont.ttf
vendored
BIN
dist/iconfont.ttf
vendored
Binary file not shown.
BIN
dist/iconfont.woff
vendored
BIN
dist/iconfont.woff
vendored
Binary file not shown.
23
docs/.vuepress/README.md
Normal file
23
docs/.vuepress/README.md
Normal file
@ -0,0 +1,23 @@
|
||||
|
||||
## vue-markdown
|
||||
### [使用文档](https://zhaoxuhui1122.github.io/vue-markdown-docs/)
|
||||
|
||||
一款使用marked和highlight.js开发的一款markdown编辑器,除常见markdown语法外,支持快捷输入、图片粘贴、代码复制、全屏编辑、预览等功能。
|
||||
```vue
|
||||
<template>
|
||||
<div class="simple">
|
||||
<Markdown :height="400" theme="oneDark"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Markdown from 'src/components/simple/simple';
|
||||
export default {
|
||||
name: "simple",
|
||||
components:{
|
||||
Markdown
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
```
|
21
docs/.vuepress/components/doc.js
Normal file
21
docs/.vuepress/components/doc.js
Normal file
@ -0,0 +1,21 @@
|
||||
export default `## vue-markdown
|
||||
一款使用marked和highlight.js开发的一款markdown编辑器,除常见markdown语法外,支持快捷输入、图片粘贴、代码复制、全屏编辑、预览等功能。
|
||||
\`\`\`vue
|
||||
<template>
|
||||
<div class="simple">
|
||||
<Markdown :height="400" theme="oneDark"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Markdown from 'src/components/simple/simple';
|
||||
export default {
|
||||
name: "simple",
|
||||
components:{
|
||||
Markdown
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
\`\`\`
|
||||
`
|
23
docs/.vuepress/components/preview.vue
Normal file
23
docs/.vuepress/components/preview.vue
Normal file
@ -0,0 +1,23 @@
|
||||
<template>
|
||||
<div class="preview">
|
||||
<Preview :initialValue="value"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Preview from '../../../src/preview';
|
||||
import doc from './doc';
|
||||
export default {
|
||||
name: "preview",
|
||||
components:{Preview},
|
||||
data() {
|
||||
return {
|
||||
value:doc
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {}
|
||||
}
|
||||
</script>
|
26
docs/.vuepress/components/pro.vue
Normal file
26
docs/.vuepress/components/pro.vue
Normal file
@ -0,0 +1,26 @@
|
||||
<template>
|
||||
<div class="simple">
|
||||
<Markdown :height="400" theme="dark" v-model="value" :toolbars="toolbars"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Markdown from '../../../src/components/pro';
|
||||
import doc from './doc';
|
||||
|
||||
export default {
|
||||
name: "simple",
|
||||
components:{
|
||||
Markdown
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
value:doc,
|
||||
toolbars:{
|
||||
redo:false,
|
||||
undo:false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
22
docs/.vuepress/components/simple.vue
Normal file
22
docs/.vuepress/components/simple.vue
Normal file
@ -0,0 +1,22 @@
|
||||
<template>
|
||||
<div class="simple">
|
||||
<Markdown :height="400" theme="oneDark" v-model="value"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Markdown from '../../../src/components/simple';
|
||||
import doc from './doc';
|
||||
|
||||
export default {
|
||||
name: "simple",
|
||||
components:{
|
||||
Markdown
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
value:doc
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
37
docs/.vuepress/config.js
Normal file
37
docs/.vuepress/config.js
Normal file
@ -0,0 +1,37 @@
|
||||
module.exports = {
|
||||
base: process.env.docs_env === 'dev' ? '' : '/vue-markdown-docs/',
|
||||
title: 'vue-markdown',
|
||||
description: '一款使用marked和highlight.js开发的一款vue markdown编辑器,支持codemirror编辑器。',
|
||||
|
||||
themeConfig: {
|
||||
nav: [
|
||||
{text: 'GitHub', link: 'https://github.com/zhaoxuhui1122/vue-markdown'}
|
||||
],
|
||||
sidebar: [
|
||||
['/', '介绍'],
|
||||
['/demo', '示例'],
|
||||
['/use', '起步'],
|
||||
{
|
||||
title: 'API',
|
||||
collapsable: false,
|
||||
children: [
|
||||
['/props', 'Props'],
|
||||
['/events', 'Event']
|
||||
]
|
||||
}, {
|
||||
title: '二次开发',
|
||||
collapsable: false,
|
||||
children: [
|
||||
['/extend', '功能扩展'],
|
||||
['/optimize', '优化']
|
||||
]
|
||||
}, {
|
||||
collapsable: false,
|
||||
children: [
|
||||
['/others', '其他']
|
||||
]
|
||||
},
|
||||
['/changelog', '更新日志'],
|
||||
]
|
||||
}
|
||||
}
|
27
docs/README.md
Normal file
27
docs/README.md
Normal file
@ -0,0 +1,27 @@
|
||||
# 介绍
|
||||
|
||||
vue-marodown是一款使用marked和highlight.js开发的一款markdown编辑器,主要包括三个部分
|
||||
|
||||
1. 简单版编辑器,左侧文本输入框使用textarea实现;
|
||||
2. 专业版编辑器,左侧输入框使用codemirror实现;
|
||||
3. markdown预览组件,可单独使用。
|
||||
|
||||
## 简单版编辑器
|
||||
简单版编辑器为默认编辑器,具有体积小的优势,功能上相对于专业版无删减,区别在于
|
||||
- 不支持输入文本识别,无法根据不同的语法在输入框内显示不同的样式
|
||||
- 头部菜单插入内容时不支持对已选择文本区域操作
|
||||
## 专业版编辑器
|
||||
左侧的编辑区域使用codemirror实现,看起来更像一个专业的编辑器,保留了编辑器绝大多数功能,相比于普通版区别为
|
||||
- 支持根据输入的文本类型显示不同样式
|
||||
- 支持设置代码块语言,并高亮显示
|
||||
- 支持对输入框内的文本选中后进行操作
|
||||
## 预览组件
|
||||
预览组件为单独的一个组件,区别于编辑器内的预览模式,显示样式与编辑器内预览区域完全一致,支持设置主题,复制代码,预览图片、设置maked.js初始化设置等功能。
|
||||
|
||||
## 如何选用
|
||||
|
||||
- 如果支持想简单的实现一个富文本编辑器,对功能和输入框样式没有过多的要求,建议简单版即可,毕竟体积优势大,gzip压缩后仅有50kb。
|
||||
- 如果想让编辑器看起来更专业一点儿,文本输入区域功能更强大一点儿,建议选用pro版,代价是文件体积将会变大。
|
||||
- 如果只是想单纯的展示markdown文件,选用markdown-preview即可。
|
||||
|
||||
|
47
docs/changelog.md
Normal file
47
docs/changelog.md
Normal file
@ -0,0 +1,47 @@
|
||||
### 2.0.0
|
||||
- 新增专业版编辑器
|
||||
- 新增预览组件
|
||||
- 修复页面滚动bug
|
||||
- 修改markdown文件导入失败问题
|
||||
|
||||
### 1.4.0
|
||||
- 支持输入值双向数据绑定
|
||||
- 支持预览模式
|
||||
- 支持复制代码块
|
||||
- 工具栏增加增加清空内容、保存、分屏、预览功能
|
||||
|
||||
|
||||
### 1.3.0
|
||||
- 支持配置marked的markedOptions,感谢[dkvirus](https://github.com/dkvirus)提出的[issues#12](https://github.com/zhaoxuhui1122/vue-markdown/issues/12)和具体的解决办法
|
||||
|
||||
### 1.2.1
|
||||
- 支持theme、width、heigh动态切换
|
||||
|
||||
### 1.2.0
|
||||
- 优化代码体积,按需加载highlight.js,较少了三分之二的代码体积
|
||||
- 新增图片粘贴功能
|
||||
- 增加图片预览功能
|
||||
- 修复部分bug
|
||||
|
||||
### 1.0.0
|
||||
- 优化代码体积,按需加载highlight.js,较少了三分之二的代码体积
|
||||
- 新增图片粘贴功能
|
||||
- 增加图片预览功能
|
||||
- 修复部分bug
|
||||
|
||||
### 0.9.3
|
||||
|
||||
- 解决初始化值initialValue无法动态改变的问题
|
||||
- 修改了打包配置
|
||||
|
||||
### 0.8.0
|
||||
|
||||
- 新增md文件导出和读取功能
|
||||
- 修改预览部分样式
|
||||
- 修改头部菜单样式
|
||||
|
||||
### 0.7.0
|
||||
|
||||
- 修复主题无法更新的问题
|
||||
- 修复文档初始化值无法动态切换的问题
|
||||
|
18
docs/demo.md
Normal file
18
docs/demo.md
Normal file
@ -0,0 +1,18 @@
|
||||
## 简单版
|
||||
<ClientOnly>
|
||||
<simple/>
|
||||
</ClientOnly>
|
||||
|
||||
## 专业版
|
||||
|
||||
<ClientOnly>
|
||||
<pro/>
|
||||
</ClientOnly>
|
||||
|
||||
## 预览组件
|
||||
|
||||
<ClientOnly>
|
||||
<preview/>
|
||||
</ClientOnly>
|
||||
|
||||
|
13
docs/events.md
Normal file
13
docs/events.md
Normal file
@ -0,0 +1,13 @@
|
||||
### on-ready
|
||||
编辑器初始化完成时触发,返回值为`Object`,包含组件本身和`insertContent`方法。
|
||||
|
||||
### on-save
|
||||
编辑器保存事件,自动保存或者手动保存时触发,支持`ctrl+s`或`command+s`触发保存,返回值类型为`Object`,包含当前输入值`value`和选择的代码块主题`theme`。
|
||||
|
||||
|
||||
### on-paste-image
|
||||
|
||||
监听编辑器粘贴图片事件,在编辑区域内手动粘贴图片时触发,可用于支持粘贴插入图片文件,返回`file`文件,上传文件后可结合`on-ready`事件内返回的`insertContent`插入图片。
|
||||
|
||||
### on-copy
|
||||
复制代码块内容,触发时返回当前代码块的text,copyCode开启时才有效。
|
85
docs/extend.md
Normal file
85
docs/extend.md
Normal file
@ -0,0 +1,85 @@
|
||||
## 粘贴插入图片
|
||||
|
||||
`on-paste-image`虽然可以支持图片粘贴事件的监听,但不会处理图片上传至服务器并将链接插入编辑器这段逻辑。
|
||||
|
||||
目前如果想要支持粘贴插入图片,需要在`on-paste-image`方法里上传图片文件,拿到图片地址后,使用`on-ready`方法里返回的insertContent方法插入图片。
|
||||
|
||||
上述操作显得过于复杂,可以直接在源码里扩展mixins里的`handlePaste`方法,图片上传完成后,直接调用`this.insertContent`方法插入图片。
|
||||
|
||||
修改`/markdown/mixins/common.js`
|
||||
|
||||
```js
|
||||
handlePaste(_, e) {// 粘贴图片
|
||||
const { clipboardData = {} } = e;
|
||||
const { types = [], items } = clipboardData;
|
||||
let item = null;
|
||||
for (let i = 0; i < types.length; i++) {
|
||||
if (types[i] === 'Files') {
|
||||
item = items[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (item) {
|
||||
const file = item.getAsFile();
|
||||
if (/image/gi.test(file.type)) {
|
||||
e.preventDefault();
|
||||
// 1.上传操作
|
||||
// 2.插入图片 this.insertContent(`![image](imgUrl)`)
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
## 支持流程图、甘特图等语法
|
||||
|
||||
目前编辑器只支持常见code语法,如果需要实现如流程图等功能,需要进一步扩展,以实现一个简单的流程图为例,具体实现思路如下:
|
||||
|
||||
默认情况下,markedjs会使用renderer.code方法对输入的代码块进行解析,并会借助`highlight.js`支持语法高亮。
|
||||
可以将流程图语法输入到代码块内,并标明语言,重写marked.Renderer的code解析方法,结合结合`flowchart.js`路程图代码进行解析,返回文本内容。
|
||||
|
||||
修改`/markdown/libs/js/simple.js
|
||||
|
||||
```js
|
||||
import hljs from './hljs';
|
||||
import index from 'index';
|
||||
import {parse} from 'flowchart.js'
|
||||
|
||||
hljs.initHighlightingOnLoad();
|
||||
|
||||
const renderer = new index.Renderer();
|
||||
renderer.code = (code, language) => {
|
||||
if (language === 'flow') {// 流程图
|
||||
const dom = document.createElement('div');
|
||||
const flowchart = parse(code);
|
||||
flowchart.drawSVG(dom, {/*相关配置*/});
|
||||
return dom.innerHTML;
|
||||
} else {// 默认解析
|
||||
return `<pre class="hljs"><code class="${language}">${hljs.highlightAuto(code).value}</code></pre>`
|
||||
}
|
||||
}
|
||||
export default index.setOptions({
|
||||
renderer,
|
||||
gfm: true,
|
||||
tables: true,
|
||||
breaks: false,
|
||||
pedantic: false,
|
||||
sanitize: false,
|
||||
smartLists: true,
|
||||
highlight: function (code) {
|
||||
return hljs.highlightAuto(code).value;
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
## 自定义markdown语法转换
|
||||
|
||||
项目内使用的`index.js均为其默认配置功能,如需要特殊转换,可重写其内部的解析方法,即重写其renderer相关方法
|
||||
[参考文档](https://github.com/markedjs/marked/blob/master/docs/USING_PRO.md)。
|
||||
|
||||
## 自动生成文档目录
|
||||
|
||||
预览区域和文档预览组件暂不支持自动生成目录,实现自动生成目录思路目前想到的大致有
|
||||
- 重写`renderer.heading` 方法,为生成的标题添加id,输入特定快捷键,如`[TOC]`时,查找预览区域内的的所有标题标签,分析等级关系,生成目录标签
|
||||
|
||||
## icon替换
|
||||
项目内所有的icon和命名参考`/assets/font/index.html`,替换时需注意,预览区域的checkbox为icon,注意一并替换,
|
||||
修改`/assets/css/index.less`内的`input[type="checkbox"]`的`:after`样式。
|
25
docs/introduce.md
Normal file
25
docs/introduce.md
Normal file
@ -0,0 +1,25 @@
|
||||
## 简介
|
||||
|
||||
一款使用marked和highlight.js开发的一款markdown编辑器,除常见markdown语法外,支持快捷输入、图片粘贴、代码复制、全屏编辑、预览等功能。
|
||||
|
||||
使用起来简单方便,只需几行代码,即可在你的页面上引入一个markdown编辑器,编辑区支持像专业编辑器那样。
|
||||
|
||||
编辑器涵盖了常用的markdown编辑器功能,可通过已有属性进行配置,对编辑器功能和样式进行基本的配置,也可根据需求进行深度定制。
|
||||
|
||||
## 特点
|
||||
- 使用简单,只需要安装npm包,引入项目即可使用,不需要繁琐的初始化配置。
|
||||
- 方便扩展,根据实际需求,支持常见的功能配置,也可根据实际需求进行深度定制。
|
||||
- 体积小,加载速度快,npm包删除了highlight.js和codemirror里的依赖。
|
||||
- 灵活的主题,默认支持四种代码块风格,也可根据实际需求定制自己的主题样式
|
||||
- 功能强大,支持专业版的编辑器,使用codemirror实现编辑窗口,可识别markdown语法
|
||||
- 键盘事件监听,如保存、粘贴、回车时上次输入语法判断等
|
||||
- 可扩展性强,除了提供的属性配置编辑器,也可直接在原有组件基础上进行二次开发
|
||||
|
||||
## 实现思路
|
||||
|
||||
通过监听文本输入区域内内容的变化,实时将输入的markdown语法进行编译,并渲染到预览区域。
|
||||
|
||||
编辑器大致分为头部菜单栏、左侧内容输入区域、右侧预览区域三个部分。
|
||||
头部菜单主要为定自定义标题区域和菜单按钮,菜单按钮可通过配置文件进行显示和隐藏;左侧编辑区域,简单版使用textarea开发,满足基本需求,
|
||||
专业版使用codemirror开发,编辑区域支持手动输入文本和通过头部菜单插入;右侧预览区域可实时预览输入文本,并可通过菜单按钮,进行编辑区域和预览区域的切换。
|
||||
|
68
docs/optimize.md
Normal file
68
docs/optimize.md
Normal file
@ -0,0 +1,68 @@
|
||||
### 代码体积优化
|
||||
|
||||
|
||||
#### 公共代码提取
|
||||
npm包构建时,三个组件完全独立,没有抽离公共文件,所以,当同一个项目内引入其中的两个或三个组件都引入时,存在一定的重复代码,
|
||||
主要为`highlight.js`、`marked`、`iconfont`、css样式几个部分。
|
||||
|
||||
解决方式:将组件复制到本地项目,打包时将这些文件作为公共文件抽离出来。
|
||||
|
||||
**注意**:三个组件中使用的iconfont为同一套,如果只是单纯的使用`preview`组件,
|
||||
将会引入整个项目所使用的iconfont,可删除iconfont的引入,
|
||||
重写`input[type="checkbox"]`的样式,preview组件体积将会减少一半,样式文件位于`markdown/assets/css/index.less`。
|
||||
|
||||
#### codemirror体积优化
|
||||
codemirror主要分为主文件、mode相关文件和样式文件,主文件体积异常的大,mode文件目前只选用了css/jsvascript/markdown/meta/xml五个文件,
|
||||
其中markdown.js和meta.js为必须引用的,项目中已将常见的编程语言代码风格定义为css/js/xml之一,例如less/sass/scss按照css规则解析,html/vue按照xml规则解析。
|
||||
优化可从一下方面入手
|
||||
- 减少codemirror主文件体积
|
||||
- 减少引用的mode依赖
|
||||
|
||||
#### highlight.js体积优化
|
||||
|
||||
highlight.js原本体积也是较大的,主要原因为,编译时为支持各种代码语言,引入了相应的解析文件,
|
||||
项目内已根据常见的代码语言进行了一次筛选,进行按需引入,可根据自身需求,再次对引用文件进行删减
|
||||
|
||||
参见`src/markdown/libs/js/hljs.js`,目前支持的语言有
|
||||
```js
|
||||
import hljs from 'highlight.js/lib/highlight'
|
||||
|
||||
import javascript from 'highlight.js/lib/languages/javascript'
|
||||
import java from 'highlight.js/lib/languages/java';
|
||||
import css from 'highlight.js/lib/languages/css';
|
||||
import less from 'highlight.js/lib/languages/less';
|
||||
import go from 'highlight.js/lib/languages/go';
|
||||
import markdown from src;
|
||||
import php from 'highlight.js/lib/languages/php';
|
||||
import python from 'highlight.js/lib/languages/python';
|
||||
import ruby from 'highlight.js/lib/languages/ruby';
|
||||
import stylus from 'highlight.js/lib/languages/stylus';
|
||||
import typescript from 'highlight.js/lib/languages/typescript';
|
||||
import xml from 'highlight.js/lib/languages/xml';
|
||||
|
||||
const languages = {
|
||||
javascript,
|
||||
java,
|
||||
css,
|
||||
less,
|
||||
markdown,
|
||||
go,
|
||||
php,
|
||||
python,
|
||||
ruby,
|
||||
stylus,
|
||||
typescript,
|
||||
xml
|
||||
}
|
||||
Object.keys(languages).forEach(key => {
|
||||
hljs.registerLanguage(key, languages[key])
|
||||
})
|
||||
|
||||
export default hljs;
|
||||
```
|
||||
|
||||
#### 专业版编辑器codemirror/simple.js
|
||||
优化思路:无
|
||||
#### iconfont 体积优化
|
||||
只需要preview组件时,避免引入所有icon,参考功能扩展里icon替换方法。
|
||||
|
10
docs/others.md
Normal file
10
docs/others.md
Normal file
@ -0,0 +1,10 @@
|
||||
## 升级路线
|
||||
- 普通版编辑器对选中文本进行操作功能
|
||||
- 文档目录功能
|
||||
- 优化专业版编辑器体积
|
||||
- react版开发
|
||||
- ...
|
||||
|
||||
## 问题反馈
|
||||
|
||||
对于功能上的缺陷、使用方法和希望扩展的功能,可以提 [Issues](https://github.com/zhaoxuhui1122/vue-markdown/issues)。
|
156
docs/props.md
Normal file
156
docs/props.md
Normal file
@ -0,0 +1,156 @@
|
||||
## 编辑器基本属性
|
||||
### value
|
||||
- Type: `String/Number`
|
||||
- Default: `''`
|
||||
|
||||
编辑器输入的文本,支持通过`v-dodel`数据双向绑定设置编辑器内容和获取编辑器的值。
|
||||
|
||||
### width
|
||||
- Type: `String/Number`
|
||||
- Default: `auto`
|
||||
|
||||
编辑器的初始化宽度。
|
||||
|
||||
### height
|
||||
- Type: `Number`
|
||||
- Default: `600`
|
||||
|
||||
编辑器的初始化高度。
|
||||
|
||||
### bordered
|
||||
- Type: `Boolean`
|
||||
- Default: `true`
|
||||
|
||||
编辑器是否含有边框。
|
||||
|
||||
### toolbars
|
||||
- Type: `Object`
|
||||
- Default: `参见下表`
|
||||
|
||||
头部菜单按钮,通过设置true or false控制决定是否显示,目前配置支持持控制按钮显示隐藏,后续将支持根据配置显示排列顺序。
|
||||
|
||||
名称 | 说明 | 默认是否显示
|
||||
---|---|---
|
||||
strong|粗体|是
|
||||
italic|斜体|是
|
||||
overline |删除线|是
|
||||
h1 |标题1|是
|
||||
h2 |标题2|是
|
||||
h3 |标题3|是
|
||||
h4|标题4|否
|
||||
h5 |标题5|否
|
||||
h6 |标题6|否
|
||||
hr |分割线|是
|
||||
quote|引用|是
|
||||
ul |无序列表|是
|
||||
ol|有序列表|是
|
||||
code |代码块|是
|
||||
link |链接|是
|
||||
image|image|是
|
||||
table |表格|是
|
||||
checked|已完成列表|是
|
||||
notChecked |未完成列表|是
|
||||
preview|预览|是
|
||||
split|分屏模式切换|是
|
||||
print |打印|否
|
||||
theme|主题切换|是
|
||||
fullscreen |全屏|是
|
||||
exportmd|导出为*.md文件|是
|
||||
importmd|导入本地*.md文件|是
|
||||
save|保存按钮|否
|
||||
clear|清空内容|否
|
||||
|
||||
|
||||
### theme
|
||||
- Type: `String`
|
||||
- Default: `light`
|
||||
|
||||
编辑器代码块主题,目前支持`light`、`dark`、`oneDark`、`gitHub`四种代码块风格,可通过自定义theme并修改样式文件进行主题定制。
|
||||
|
||||
自定义theme时,预览区域的会增加一个为`markdown-theme-[theme]`的`class`。
|
||||
|
||||
|
||||
### autoSave
|
||||
- Type: `Boolean`
|
||||
- Default: `false`
|
||||
|
||||
是否开启自动保存,设置为开启时可通过绑定`on-save`事件获取编辑器内的值和代码块主题。
|
||||
```vue
|
||||
<Markdown @on-save="handleOnSave"/>
|
||||
```
|
||||
```js
|
||||
handleOnSave({value, theme}){
|
||||
console.log(value, theme);
|
||||
}
|
||||
```
|
||||
### interval
|
||||
- Type: `Number`
|
||||
- Default: `10000`
|
||||
|
||||
自动保存间隔时间,单位:`mm`,默认10000mm,需要`autoSave = true`时才有效。
|
||||
|
||||
### exportFileName
|
||||
- Type: `String`
|
||||
- Default: `unnamed`
|
||||
|
||||
导出的md文件名称,默认unnamed.md。
|
||||
|
||||
### markedOptions
|
||||
- Type: `Object`
|
||||
- Default: `{}`
|
||||
|
||||
marked配置项,可以根据需求自定义。
|
||||
|
||||
```vue
|
||||
<Markdown :markedOptions="{baseUrl:'http://***.oss-cn-shanghai.aliyuncs.com/'}"/>
|
||||
```
|
||||
### isPreview
|
||||
- Type: `Boolean`
|
||||
- Default: `false`
|
||||
|
||||
是否是预览模式,开启时可作为一个预览组件使用,与预览组件功能一致。
|
||||
|
||||
### copyCode
|
||||
- Type: `Boolean`
|
||||
- Default: `true`
|
||||
|
||||
是否支持复制代码块内的内容。
|
||||
|
||||
### copyBtnText
|
||||
- Type: `String`
|
||||
- Default: `复制代码`
|
||||
|
||||
复制代码按钮显示文字。
|
||||
|
||||
|
||||
## 预览组件基本属性
|
||||
### initialValue
|
||||
- Type: `String/Number`
|
||||
- Default: `''`
|
||||
|
||||
预览组件初始化内容,支持动态更新。
|
||||
|
||||
### theme
|
||||
- Type: `String`
|
||||
- Default: `light`
|
||||
|
||||
代码块主题,与编辑器编辑器代码块主题一致。
|
||||
|
||||
### markedOptions
|
||||
- Type: `Object`
|
||||
- Default: `{}`
|
||||
|
||||
marked配置项,与编辑器内该配置一致。
|
||||
|
||||
### copyCode
|
||||
- Type: `Boolean`
|
||||
- Default: `true`
|
||||
|
||||
是否支持复制代码块内的内容。
|
||||
|
||||
|
||||
### copyBtnText
|
||||
- Type: `String`
|
||||
- Default: `复制代码`
|
||||
|
||||
复制代码按钮显示文字。
|
13
docs/publish-docs.js
Normal file
13
docs/publish-docs.js
Normal file
@ -0,0 +1,13 @@
|
||||
const shell = require('shelljs');
|
||||
|
||||
shell.cd('docs/.vuepress');
|
||||
if (!shell.which('git')) {
|
||||
shell.exit(1);
|
||||
}
|
||||
|
||||
shell.cp('README.md','dist');
|
||||
shell.cd('dist');
|
||||
shell.exec('git init');
|
||||
shell.exec('git add .');
|
||||
shell.exec('git commit -m "更新文档"');
|
||||
shell.exec('git push -f git@github.com:zhaoxuhui1122/vue-markdown-docs.git master');
|
63
docs/use.md
Normal file
63
docs/use.md
Normal file
@ -0,0 +1,63 @@
|
||||
## 安装方式
|
||||
### 使用npm安装
|
||||
|
||||
1. 安装依赖
|
||||
```
|
||||
npm i -S vue-meditor
|
||||
```
|
||||
|
||||
### 将组件复制到项目内
|
||||
1. 将git仓库代码拉到本地
|
||||
```
|
||||
git clone https://github.com/zhaoxuhui1122/vue-markdown.git
|
||||
```
|
||||
|
||||
2. 复制src文件夹下内容至components文件夹下
|
||||
|
||||
## 在项目使用
|
||||
#### npm包安装时
|
||||
简单版
|
||||
```js
|
||||
import Markdown from 'vue-meditor'
|
||||
```
|
||||
专业版
|
||||
```js
|
||||
import { MarkdownPro } from 'vue-meditor'
|
||||
```
|
||||
预览组件
|
||||
```js
|
||||
import { MarkdownPreview } from 'vue-meditor'
|
||||
```
|
||||
#### 复制组件到本地时(推荐)
|
||||
简单版
|
||||
```js
|
||||
import Markdown from '@/components/markdown/...';
|
||||
```
|
||||
专业版
|
||||
```js
|
||||
import MarkdownPro from '@/components/markdown/pro';
|
||||
```
|
||||
预览组件
|
||||
```js
|
||||
import MarkdownPreview from '@/components/markdown/preview';
|
||||
```
|
||||
|
||||
#### 在页面内使用
|
||||
```vue
|
||||
<template>
|
||||
<div class="markdown">
|
||||
<Markdown/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Markdown from 'vue-meditor';
|
||||
|
||||
export default {
|
||||
name: "markdown",
|
||||
components: {
|
||||
Markdown
|
||||
}
|
||||
}
|
||||
</script>
|
||||
```
|
14
index.dev.html
Executable file
14
index.dev.html
Executable file
@ -0,0 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>markdown</title>
|
||||
<meta charset="utf-8">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<!-- <script src="./dist/simple.js"></script> -->
|
||||
</body>
|
||||
|
||||
</html>
|
13
index.html
13
index.html
@ -1,13 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>markdown编辑器组件</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script src="./dist/build.js"></script>
|
||||
</body>
|
||||
</html>
|
8
index.js
Normal file
8
index.js
Normal file
@ -0,0 +1,8 @@
|
||||
|
||||
import simple from './simple';
|
||||
import pro from './pro';
|
||||
import preview from './preview';
|
||||
|
||||
export default simple;
|
||||
export const MarkdownPro = pro ;
|
||||
export const MarkdownPreview = preview ;
|
7
main.js
Executable file
7
main.js
Executable file
@ -0,0 +1,7 @@
|
||||
import Vue from 'vue';
|
||||
import App from './App';
|
||||
|
||||
new Vue({
|
||||
el: '#app',
|
||||
render: h => h(App),
|
||||
});
|
8300
package-lock.json
generated
8300
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
85
package.json
Normal file → Executable file
85
package.json
Normal file → Executable file
@ -1,56 +1,63 @@
|
||||
{
|
||||
"name": "vue-meditor",
|
||||
"description": "一款使用marked和highlight.js开发的一款markdown编辑器",
|
||||
"version": "1.4.2",
|
||||
"version": "2.0.0",
|
||||
"author": "zhaoxuhui<1258835133@qq.com>",
|
||||
"license": "MIT",
|
||||
"main": "build/index.js",
|
||||
"private": false,
|
||||
"main": "dist/index.js",
|
||||
"keywords": [
|
||||
"markdown编辑器",
|
||||
"vue markdown编辑器",
|
||||
"vue 编辑器"
|
||||
"vue 编辑器",
|
||||
"vue codemirror"
|
||||
],
|
||||
"scripts": {
|
||||
"dev": "cross-env NODE_ENV=development webpack-dev-server --open --hot",
|
||||
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules",
|
||||
"build:npm": "cross-env NODE_ENV=npm webpack --progress --hide-modules",
|
||||
"analyzer": "cross-env analyzer=true NODE_ENV=npm webpack --progress --hide-modules",
|
||||
"lint": "eslint --ext .js src ",
|
||||
"lint:fix": "eslint --fix --ext .js src"
|
||||
"start": "webpack-dev-server --config ./config/webpack.dev.config.js --quite",
|
||||
"build": "webpack --config ./config/webpack.config.js --quite",
|
||||
"analyzer": "cross-env analyzer=1 webpack --config ./config/webpack.config.js --quite",
|
||||
"docs": "cross-env docs_env=dev vuepress dev docs",
|
||||
"build:docs": "cross-env docs_env=prod vuepress build docs",
|
||||
"publish:docs": "cross-env docs_env=pros npm run build:docs && node docs/publish-docs.js",
|
||||
"lint": "eslint --ext .js,.vue src ",
|
||||
"lint:fix": "eslint --fix --ext .js,.vue src"
|
||||
},
|
||||
"dependencies": {
|
||||
"highlight.js": "^9.12.0",
|
||||
"marked": "^0.4.0",
|
||||
"vue": "^2.5.11",
|
||||
"vue-meditor": "^1.3.0"
|
||||
},
|
||||
"browserslist": [
|
||||
"> 1%",
|
||||
"last 2 versions",
|
||||
"not ie <= 8"
|
||||
],
|
||||
"devDependencies": {
|
||||
"babel-core": "^6.26.0",
|
||||
"babel-loader": "^7.1.2",
|
||||
"babel-preset-env": "^1.6.0",
|
||||
"babel-preset-stage-3": "^6.24.1",
|
||||
"compression-webpack-plugin": "^1.1.11",
|
||||
"cross-env": "^5.2.0",
|
||||
"css-loader": "^0.28.11",
|
||||
"@babel/core": "^7.6.4",
|
||||
"@babel/preset-env": "^7.6.3",
|
||||
"babel-loader": "^8.0.6",
|
||||
"clean-webpack-plugin": "^3.0.0",
|
||||
"copy-webpack-plugin": "^5.0.4",
|
||||
"cross-env": "^6.0.3",
|
||||
"css-loader": "^3.2.0",
|
||||
"eslint": "^6.6.0",
|
||||
"eslint-loader": "^3.0.2",
|
||||
"eslint-plugin-vue": "^5.2.3",
|
||||
"file-loader": "^1.1.4",
|
||||
"less": "^3.0.4",
|
||||
"less-loader": "^4.1.0",
|
||||
"vue-loader": "^13.0.5",
|
||||
"vue-template-compiler": "^2.4.4",
|
||||
"webpack": "^3.6.0",
|
||||
"file-loader": "^4.2.0",
|
||||
"flowchart.js": "^1.12.2",
|
||||
"html-webpack-plugin": "^3.2.0",
|
||||
"less": "^3.10.3",
|
||||
"less-loader": "^5.0.0",
|
||||
"mini-css-extract-plugin": "^0.8.0",
|
||||
"optimize-css-assets-webpack-plugin": "^5.0.3",
|
||||
"progress-bar-webpack-plugin": "^1.12.1",
|
||||
"shelljs": "^0.8.3",
|
||||
"uglifyjs-webpack-plugin": "^2.2.0",
|
||||
"url-loader": "^2.2.0",
|
||||
"vue": "^2.6.10",
|
||||
"vue-loader": "^15.7.1",
|
||||
"vue-meditor": "^1.5.2",
|
||||
"vue-template-compiler": "^2.6.10",
|
||||
"webpack": "^4.41.2",
|
||||
"webpack-bundle-analyzer": "^3.6.0",
|
||||
"webpack-dev-server": "^2.9.1"
|
||||
"webpack-cli": "^3.3.10",
|
||||
"webpack-dashboard": "^3.2.0",
|
||||
"webpack-dev-server": "^3.9.0",
|
||||
"webpack-merge": "^4.2.2"
|
||||
},
|
||||
"readmeFilename": "README.md",
|
||||
"files": [
|
||||
"build",
|
||||
"README.md"
|
||||
]
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/zhaoxuhui1122/vue-markdown"
|
||||
},
|
||||
"homepage": "https://github.com/webpack/webpack"
|
||||
}
|
||||
|
101
src/App.vue
101
src/App.vue
@ -1,101 +0,0 @@
|
||||
<template>
|
||||
<div id="app">
|
||||
<div class="container">
|
||||
<h1>vue-markdown编辑器组件</h1>
|
||||
<a target="_blank" href="https://github.com/zhaoxuhui1122/vue-markdown">使用文档</a>
|
||||
<div class="content">
|
||||
<mark-down
|
||||
@on-paste-image="handlePasteImage"
|
||||
@on-save="save"
|
||||
:theme="theme"
|
||||
v-model="value"
|
||||
@on-theme-change="onThemeChange"
|
||||
:markedOptions="{baseUrl:'http://smalleyes.oss-cn-shanghai.aliyuncs.com/'}"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import MarkDown from './markdown/index' // 开发文件
|
||||
// import MarkDown from "../build"; // 引入打包好的文件
|
||||
// import MarkDown from 'vue-meditor';
|
||||
|
||||
import doc from './doc';
|
||||
|
||||
export default {
|
||||
name: "app",
|
||||
components: {
|
||||
MarkDown
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
value: "",
|
||||
theme: 'OneDark'
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
save(res) {
|
||||
console.log(res);
|
||||
},
|
||||
handlePasteImage(res) {
|
||||
console.log(res);
|
||||
},
|
||||
onThemeChange(theme) {
|
||||
console.log(theme)
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
setTimeout(() => {
|
||||
this.value = doc;
|
||||
}, 1000);
|
||||
|
||||
},
|
||||
watch: {
|
||||
value() {
|
||||
console.log(this.value)
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.container {
|
||||
width: 80vw;
|
||||
margin: 0 auto;
|
||||
|
||||
h1 {
|
||||
font-size: 26px;
|
||||
font-weight: 400;
|
||||
margin: 12px 0;
|
||||
}
|
||||
|
||||
a {
|
||||
display: inline-block;
|
||||
background-color: #f8f8f9;
|
||||
border-radius: 4px;
|
||||
padding: 8px 16px;
|
||||
border: 1px solid #edeff0;
|
||||
border-radius: 4px;
|
||||
margin-bottom: 20px;
|
||||
text-decoration: none;
|
||||
color: #2d8cf0;
|
||||
}
|
||||
|
||||
ul {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.content {
|
||||
/*border: 1px solid #ccc;*/
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
@ -4,10 +4,10 @@
|
||||
*/
|
||||
|
||||
// Dark
|
||||
.Dark {
|
||||
/deep/ .markdown-theme-dark{
|
||||
pre {
|
||||
display: block;
|
||||
padding: 15px 20px !important;
|
||||
padding: 20px 10px!important;
|
||||
border-radius: 4px;
|
||||
margin: 20px 0 !important;
|
||||
background: #1e1e1e;
|
113
src/assets/css/github.less
Normal file
113
src/assets/css/github.less
Normal file
@ -0,0 +1,113 @@
|
||||
@charset "utf-8";
|
||||
/*
|
||||
*Author zhaoxuhui
|
||||
*/
|
||||
// gitHub 风格
|
||||
/deep/ .markdown-theme-gitHub{
|
||||
pre {
|
||||
padding: 20px 10px!important;
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
color: #333;
|
||||
background: #f7f8fa !important;
|
||||
font-size: 13px;
|
||||
line-height: 20px;
|
||||
border-radius: 4px;
|
||||
margin: 10px 0 !important;
|
||||
overflow-x: auto !important;
|
||||
|
||||
* {
|
||||
font-family: Consolas !important;
|
||||
}
|
||||
}
|
||||
|
||||
.hljs-comment,
|
||||
.hljs-quote {
|
||||
color: #998;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-selector-tag,
|
||||
.hljs-subst {
|
||||
color: #333;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.hljs-keyword {
|
||||
color: #d73a49;
|
||||
}
|
||||
|
||||
.hljs-literal,
|
||||
.hljs-number,
|
||||
.hljs-tag .hljs-attr,
|
||||
.hljs-template-variable,
|
||||
.hljs-variable {
|
||||
color: #008080;
|
||||
}
|
||||
|
||||
.hljs-doctag,
|
||||
.hljs-string {
|
||||
color: #d73a49;
|
||||
}
|
||||
|
||||
.hljs-section,
|
||||
.hljs-selector-id,
|
||||
.hljs-title {
|
||||
color: #900;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.hljs-subst {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.hljs-class .hljs-title,
|
||||
.hljs-type {
|
||||
color: #458;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.hljs-attribute,
|
||||
.hljs-name,
|
||||
.hljs-tag {
|
||||
color: #000080;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.hljs-link,
|
||||
.hljs-regexp {
|
||||
color: #009926;
|
||||
}
|
||||
|
||||
.hljs-bullet,
|
||||
.hljs-symbol {
|
||||
color: #990073;
|
||||
}
|
||||
|
||||
.hljs-built_in,
|
||||
.hljs-builtin-name {
|
||||
color: #0086b3;
|
||||
}
|
||||
|
||||
.hljs-meta {
|
||||
color: #999;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.hljs-deletion {
|
||||
background: #fdd;
|
||||
}
|
||||
|
||||
.hljs-addition {
|
||||
background: #dfd;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
}
|
@ -4,6 +4,14 @@
|
||||
.markdown {
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
background: @background;
|
||||
|
||||
&.border {
|
||||
border: 1px solid @border;
|
||||
@ -24,6 +32,7 @@
|
||||
bottom: 0;
|
||||
height: 100% !important;
|
||||
width: 100%;
|
||||
border: none;
|
||||
|
||||
.markdown-content {
|
||||
padding: 0;
|
||||
@ -31,23 +40,13 @@
|
||||
}
|
||||
}
|
||||
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
background: @background;
|
||||
min-height: 600px;
|
||||
|
||||
.markdown-toolbars {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
list-style: none;
|
||||
background: #fff;
|
||||
color: #464c5b;
|
||||
color: #6a6f7b;
|
||||
height: 40px;
|
||||
cursor: pointer;
|
||||
//box-shadow: 0 2px 3px #ddd;
|
||||
@ -65,17 +64,17 @@
|
||||
z-index: 999999999999;
|
||||
top: 32px;
|
||||
left: 20px;
|
||||
background: #e6e6e6;
|
||||
color: #333;
|
||||
background: #000;
|
||||
color: #fff;
|
||||
white-space: nowrap;
|
||||
font-size: 12px;
|
||||
line-height: 20px;
|
||||
line-height: 28px;
|
||||
padding: 0 6px;
|
||||
border: 1px solid @border;
|
||||
transition: all 0.3s 0.3s;
|
||||
transition: all 0.3s 0.1s;
|
||||
transform: scale(0);
|
||||
opacity: 0;
|
||||
transform-origin: top;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
@ -115,7 +114,7 @@
|
||||
|
||||
&:hover {
|
||||
background: @background;
|
||||
color: #0084ff;
|
||||
color: @info;
|
||||
}
|
||||
}
|
||||
|
||||
@ -173,7 +172,6 @@
|
||||
position: absolute;
|
||||
z-index: 9999999;
|
||||
box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.1);
|
||||
font-family: "Monospaced Number", "Chinese Quote", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
|
||||
&.active {
|
||||
opacity: 1;
|
||||
@ -239,7 +237,6 @@
|
||||
|
||||
.import-file {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
|
||||
input {
|
||||
position: absolute;
|
||||
@ -251,6 +248,19 @@
|
||||
height: 100%;
|
||||
opacity: 0;
|
||||
cursor: pointer;
|
||||
font-size: 0;
|
||||
|
||||
}
|
||||
|
||||
&:hover {
|
||||
span {
|
||||
background: @background;
|
||||
color: @info;
|
||||
}
|
||||
&:after {
|
||||
transform: scale(1);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -280,16 +290,15 @@
|
||||
.markdown-content {
|
||||
flex: 1;
|
||||
width: 100%;
|
||||
height: 400px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
padding-bottom: 0;
|
||||
|
||||
.markdown-editor {
|
||||
.markdown-editor { // simple版编辑器区域
|
||||
flex: 1;
|
||||
min-height: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
margin: 0 !important;
|
||||
overflow: hidden;
|
||||
@ -332,6 +341,8 @@
|
||||
resize: none;
|
||||
padding: 12px 8px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
overflow-x: auto;
|
||||
|
||||
&::selection {
|
||||
background: #999;
|
||||
@ -340,8 +351,15 @@
|
||||
}
|
||||
}
|
||||
|
||||
.codemirror {
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.markdown-preview {
|
||||
min-height: 100%;
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -592,12 +610,19 @@ ul.shift {
|
||||
}
|
||||
}
|
||||
|
||||
.markdown-preview {
|
||||
/deep/ .markdown-preview {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
overflow-y: scroll;
|
||||
background: #fff;
|
||||
padding: 20px 12px !important;
|
||||
font-family: 'Tahoma For Number', 'Chinese Quote', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
> div {
|
||||
padding: 10px 12px !important;
|
||||
@ -627,8 +652,8 @@ ul.shift {
|
||||
border-radius: 50%;
|
||||
position: absolute;
|
||||
z-index: 99;
|
||||
top: 7px;
|
||||
left: -20px;
|
||||
top: 10px;
|
||||
left: -8px;
|
||||
background: @content;
|
||||
}
|
||||
}
|
||||
@ -636,45 +661,34 @@ ul.shift {
|
||||
|
||||
ol,
|
||||
ul {
|
||||
margin: 20px 0;
|
||||
padding: 0 40px;
|
||||
margin: 10px 0;
|
||||
|
||||
li {
|
||||
font-size: 14px !important;
|
||||
color: @content;
|
||||
margin-bottom: 10px;
|
||||
line-height: 24px;
|
||||
padding-left: 12px;
|
||||
line-height: 22px !important;
|
||||
padding: 4px 0;
|
||||
padding-left: 6px;
|
||||
min-height: 28px;
|
||||
|
||||
input[type="checkbox"] {
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
overflow: visible;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
|
||||
&:after {
|
||||
display: block;
|
||||
content: "";
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
position: absolute;
|
||||
z-index: 99999;
|
||||
background: #fff;
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
left: -14px;
|
||||
top: 5px;
|
||||
|
||||
&:before {
|
||||
font-family: "iconfont" !important;
|
||||
color: #999;
|
||||
display: block;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
position: absolute;
|
||||
content: "\E704";
|
||||
top: 3px;
|
||||
left: -25px;
|
||||
content: "\E684";
|
||||
top: 0px;
|
||||
left: -4px;
|
||||
z-index: 999999;
|
||||
background-position: center;
|
||||
background: #fff;
|
||||
@ -686,7 +700,7 @@ ul.shift {
|
||||
|
||||
input[type="checkbox"]:checked {
|
||||
&:before {
|
||||
content: "\E610";
|
||||
content: "\E683";
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -694,6 +708,7 @@ ul.shift {
|
||||
|
||||
ol {
|
||||
list-style-type: decimal;
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
hr {
|
||||
@ -735,7 +750,6 @@ ul.shift {
|
||||
h1 {
|
||||
font-size: 28px;
|
||||
border-bottom: 1px solid @border;
|
||||
//text-align: center;
|
||||
}
|
||||
|
||||
h2 {
|
||||
@ -764,25 +778,23 @@ ul.shift {
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
/* border-bottom: 1px solid @border; */
|
||||
padding: 8px 0;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: 14px !important;
|
||||
color: @content;
|
||||
margin: @margin;
|
||||
margin-bottom: 8px;
|
||||
line-height: @line-height;
|
||||
}
|
||||
|
||||
// 图片
|
||||
img {
|
||||
display: block;
|
||||
width: 90%;
|
||||
margin: 20px auto;
|
||||
max-width: 100%;
|
||||
margin: 20px 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
// 表格样式
|
||||
table {
|
||||
width: 100%;
|
||||
border: 1px solid @border;
|
||||
@ -795,20 +807,17 @@ ul.shift {
|
||||
tr {
|
||||
-webkit-transition: background 0.1s;
|
||||
transition: background 0.1s;
|
||||
text-align: nav;
|
||||
|
||||
}
|
||||
|
||||
tr td,
|
||||
tr th {
|
||||
padding: 0 8px;
|
||||
padding: 4px 8px;
|
||||
font-size: 14px;
|
||||
line-height: 39px;
|
||||
line-height: 24px;
|
||||
color: #333;
|
||||
border-bottom: 1px solid @border;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
th {
|
||||
background: #f8f8f9;
|
||||
text-align: left;
|
||||
@ -817,14 +826,14 @@ ul.shift {
|
||||
|
||||
tr:nth-of-type(even) {
|
||||
td {
|
||||
background: #f8f8f9;
|
||||
background: #fafafa;
|
||||
}
|
||||
}
|
||||
|
||||
tr {
|
||||
&:hover {
|
||||
td {
|
||||
background: #eaf5f6;
|
||||
background: #f5f5f5;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -832,6 +841,7 @@ ul.shift {
|
||||
td,
|
||||
th {
|
||||
border: 1px solid @border;
|
||||
word-break: break-all;
|
||||
}
|
||||
}
|
||||
|
||||
@ -850,15 +860,15 @@ ul.shift {
|
||||
|
||||
.code-block {
|
||||
position: relative;
|
||||
padding: 0;
|
||||
padding: 0 !important;
|
||||
|
||||
.copy-code {
|
||||
.copy-code {// 复制代码
|
||||
position: absolute;
|
||||
z-index: 999;
|
||||
top: 0px;
|
||||
top: 5px;
|
||||
right: 10px;
|
||||
font-size: 12px;
|
||||
color: @content;
|
||||
color: @border;
|
||||
line-height: 20px;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
@ -904,7 +914,6 @@ ul.shift {
|
||||
|
||||
img {
|
||||
display: block;
|
||||
|
||||
&.vertical {
|
||||
height: 80%;
|
||||
width: auto;
|
@ -3,7 +3,7 @@
|
||||
*Author zhaoxuhui
|
||||
*/
|
||||
// 默认风格
|
||||
.Light {
|
||||
/deep/ .markdown-theme-light{
|
||||
pre {
|
||||
font-size: 14px !important;
|
||||
line-height: 1.6 !important;
|
||||
@ -12,11 +12,11 @@
|
||||
border: 0 !important;
|
||||
border-radius: 0 !important;
|
||||
background: #f7f8fb !important;
|
||||
padding: 15px 20px !important;
|
||||
padding: 20px 10px!important;
|
||||
border-radius: 4px !important;
|
||||
overflow-y: hidden !important;
|
||||
overflow-x: auto !important;
|
||||
margin: 20px 0 !important;
|
||||
margin: 10px 0 !important;
|
||||
|
||||
code {
|
||||
line-height: @line-height !important;
|
||||
@ -28,7 +28,7 @@
|
||||
}
|
||||
|
||||
* {
|
||||
-webkit-font-smoothing: antialiased;
|
||||
//-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
.hljs {
|
93
src/assets/css/one-dark.less
Normal file
93
src/assets/css/one-dark.less
Normal file
@ -0,0 +1,93 @@
|
||||
@charset "utf-8";
|
||||
/*
|
||||
*Author zhaoxuhui
|
||||
*/
|
||||
/deep/ .markdown-theme-oneDark {
|
||||
pre {
|
||||
padding: 20px 10px!important;
|
||||
display: block;
|
||||
color: #abb2bf;
|
||||
font-family: Menlo, Consolas, "Courier New", Courier, FreeMono, monospace;
|
||||
background: #292c34;
|
||||
border-radius: 4px;
|
||||
overflow-y: hidden !important;
|
||||
overflow-x: auto !important;
|
||||
margin: 10px 0 !important;
|
||||
|
||||
* {
|
||||
line-height: 1.6 !important;
|
||||
font-size: 14px;
|
||||
font-family: Menlo, Consolas, "Courier New", Courier, FreeMono, monospace;
|
||||
}
|
||||
}
|
||||
|
||||
.hljs-comment,
|
||||
.hljs-quote {
|
||||
color: #5c6370;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-doctag,
|
||||
.hljs-formula,
|
||||
.hljs-keyword {
|
||||
color: #c678dd;
|
||||
}
|
||||
|
||||
.hljs-deletion,
|
||||
.hljs-name,
|
||||
.hljs-section,
|
||||
.hljs-selector-tag,
|
||||
.hljs-subst {
|
||||
color: #e06c75;
|
||||
}
|
||||
|
||||
.hljs-literal {
|
||||
color: #56b6c2;
|
||||
}
|
||||
|
||||
.hljs-addition,
|
||||
.hljs-attribute,
|
||||
.hljs-meta-string,
|
||||
.hljs-regexp,
|
||||
.hljs-string {
|
||||
color: #98c379;
|
||||
}
|
||||
|
||||
.hljs-built_in,
|
||||
.hljs-class .hljs-title {
|
||||
color: #e6c07b;
|
||||
}
|
||||
|
||||
.hljs-attr,
|
||||
.hljs-number,
|
||||
.hljs-selector-attr,
|
||||
.hljs-selector-class,
|
||||
.hljs-selector-pseudo,
|
||||
.hljs-template-variable,
|
||||
.hljs-type,
|
||||
.hljs-variable {
|
||||
color: #d19a66;
|
||||
}
|
||||
|
||||
.hljs-bullet,
|
||||
.hljs-link,
|
||||
.hljs-meta,
|
||||
.hljs-selector-id,
|
||||
.hljs-symbol,
|
||||
.hljs-title {
|
||||
color: #61aeee;
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.hljs-link {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
}
|
@ -8,17 +8,17 @@
|
||||
@light-primary: #323741;
|
||||
@dark-primary: #1c1e24;
|
||||
//
|
||||
@info: #007acc;
|
||||
@info: #1890ff;
|
||||
@success: #19be6b;
|
||||
@warning: #ff9900;
|
||||
@error: #ed3f14;
|
||||
//
|
||||
@title: #252525;
|
||||
@content: #555;
|
||||
@title: #262626;
|
||||
@content: #262626;
|
||||
@sub-color: #80848f;
|
||||
@disabled: #bbbec4;
|
||||
@border: #dddee1;
|
||||
@divider: #e9eaec;
|
||||
@border: #d9d9d9;
|
||||
@divider: #d9d9d9;
|
||||
@background: #f7f7f7;
|
||||
@tip:#c1c1c1;
|
||||
@primary-rgba:rgba(49,204,102,0.2);
|
141
src/assets/font/iconfont.css
Normal file
141
src/assets/font/iconfont.css
Normal file
File diff suppressed because one or more lines are too long
BIN
src/assets/font/iconfont.eot
Normal file
BIN
src/assets/font/iconfont.eot
Normal file
Binary file not shown.
@ -26,7 +26,19 @@ Created by iconfont
|
||||
<glyph glyph-name="md" unicode="" d="M471.289899 141.73866699999996c-6.827051 16.384-16.043051 37.205333-27.648 62.464-10.923008 25.258667-22.869683 52.565333-35.839991 81.92-12.970995 29.354667-26.965649 59.392-41.984 90.112-14.336286 31.402667-27.989606 60.757333-40.96 88.064-12.970914 27.989333-25.258901 52.906667-36.864 74.752-10.92288 21.841067-19.797538 38.5664-26.624 50.176-7.509521-80.554667-13.653517-167.936-18.432-262.144-4.778842-93.525333-8.874837-188.074667-12.288-283.648l-97.28 0c2.730581 61.44 5.80259 123.221333 9.216 185.344 3.413248 62.805333 7.167915 124.245333 11.264 184.32 4.778573 60.757333 9.557235 119.808 14.336 177.152 5.461222 57.339733 11.263885 111.611733 17.408 162.816l87.04 0c18.431774-30.0416 38.229086-65.540267 59.392-106.496 21.162377-40.964267 42.325022-83.972267 63.488-129.024 21.162313-44.373333 41.642274-89.088 61.439991-134.144 19.796949-44.373333 37.887573-84.992 54.272-121.856 16.383531 36.864 34.474197 77.482667 54.272 121.856 19.796821 45.056 40.276821 89.770667 61.44 134.144 21.162112 45.051733 42.324736 88.059733 63.488 129.024 21.162027 40.955733 40.95936 76.4544 59.392 106.496l87.04 0c22.126421-218.018133 38.979968-435.549867 50.560683-667.84 0.56704-11.370667 44.931072 2.005333 45.472853-9.412267l-82.925739-85.713067-109.592363 85.713067c-0.523093 14.647467 50.366165-3.114667 49.810987 11.485867-3.06816 80.661333-6.62464 160.5888-10.670421 239.7824-4.779349 94.208-10.923349 181.589333-18.432 262.144-6.827349-11.6096-16.043349-28.334933-27.648-50.176-10.923307-21.845333-22.869973-46.762667-35.84-74.752-12.971264-27.306667-26.965931-56.661333-41.984-88.064-14.336555-30.72-27.989888-60.757333-40.96-90.112-12.971179-29.354667-25.259179-56.661333-36.864-81.92-10.923179-25.258667-19.797803-46.08-26.624-62.464l-79.872 0" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="checked-false" unicode="" d="M837.91129067 746.24712c9.45807787 0 18.40968747-3.7428448 25.206624-10.53978133 6.79693653-6.79693653 10.53978133-15.74854613 10.53978133-25.206624l0-652.727456c0-9.45807787-3.7428448-18.40968747-10.53978133-25.206624-6.79693653-6.79693653-15.74854613-10.53978133-25.206624-10.53978134L185.18383467 22.026853329999994c-9.45807787 0-18.40968747 3.7428448-25.206624 10.53978134-6.79693653 6.79693653-10.53978133 15.74854613-10.53978134 25.206624L149.43742933 710.49962347c0 9.45807787 3.7428448 18.40968747 10.53978134 25.206624 6.79693653 6.79693653 15.74854613 10.53978133 25.206624 10.53978133L837.91129067 746.24602773M837.91129067 792.09123733L185.18383467 792.09123733c-44.8748416 0-81.59052267-36.71568107-81.59052267-81.59052266l0-652.727456c0-44.8748416 36.71568107-81.59052267 81.59052267-81.59052267l652.727456 0c44.8748416 0 81.59052267 36.71568107 81.59052266 81.59052267L919.50181333 710.49962347C919.50181333 755.37446507 882.78613227 792.09123733 837.91129067 792.09123733L837.91129067 792.09123733z" horiz-adv-x="1024" />
|
||||
<glyph glyph-name="redo" unicode="" d="M564.734375 601.21289063l0 204.66210937 316.40625-316.40625-316.40625-316.40625 0 209.14453125c-368.11230469 8.6484375-352.31835938-250.30371094-258.609375-420.08203125-231.29296875 250.01367187-182.17089844 650.58398438 258.609375 639.08789063z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="undo" unicode="" d="M717.875-37.875c93.70898438 169.77832031 109.50292969 428.73046875-258.609375 420.08203125l0-209.14453125-316.40625 316.40625 316.40625 316.40625 0-204.66210938c440.80664063 11.49609375 489.90234375-389.10058594 258.609375-639.08789062z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="checked" unicode="" d="M841.589844-11.5078125L182.410156-11.5078125c-36.25488256 0-65.9179685 29.66308594-65.9179685 65.9179685L116.4921875 713.589844c0 36.25488256 29.66308594 65.9179685 65.9179685 65.9179685l659.17968724 0c36.25488256 0 65.9179685-29.66308594 65.91796848-65.9179685l0-659.17968724C907.5078125 18.155273439999974 877.84472656-11.5078125 841.589844-11.5078125zM841.589844 697.1103513099999c0 9.88769531-6.59179662 16.47949193-16.47949193 16.47949193L198.88964869 713.589844C189.00195338 713.589844 182.410156 706.99804662 182.410156 697.1103513099999l0-626.22070338c0-9.88769531 6.59179662-16.47949193 16.47949193-16.47949193l626.22070338 0c9.88769531 0 16.47949193 6.59179662 16.47949193 16.47949193L841.589844 697.1103513099999zM469.15332006 229.09277368999994C464.20947241 222.50097631000006 455.96972682 219.20507838000003 446.0820315 219.20507838000003s-18.12744166 3.29589869-23.07128931 9.88769531l-131.83593776 131.83593776C284.58300781 365.87255833999996 281.28710912 374.11230469 281.28710912 384c0 18.12744166 14.83154297 32.95898463 32.95898463 32.95898463 9.88769531 0 18.12744166-3.29589869 23.07128932-9.88769531l108.76464843-108.76464845 240.6005862 240.6005862c6.59179662 6.59179662 14.83154297 9.88769531 23.07128932 9.88769531 18.12744166 0 32.95898463-14.83154297 32.95898464-32.95898463 0-9.88769531-3.29589869-18.12744166-9.88769532-23.07128931L469.15332006 229.09277368999994z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="checked-false" unicode="" d="M841.589844-11.5078125L182.410156-11.5078125c-36.25488256 0-65.9179685 29.66308594-65.9179685 65.9179685L116.4921875 713.589844c0 36.25488256 29.66308594 65.9179685 65.9179685 65.9179685l659.17968724 0c36.25488256 0 65.9179685-29.66308594 65.91796848-65.9179685l0-659.17968724C907.5078125 18.155273439999974 877.84472656-11.5078125 841.589844-11.5078125zM841.589844 697.1103513099999c0 9.88769531-6.59179662 16.47949193-16.47949193 16.47949193L198.88964869 713.589844C189.00195338 713.589844 182.410156 706.99804662 182.410156 697.1103513099999l0-626.22070338c0-9.88769531 6.59179662-16.47949193 16.47949193-16.47949193l626.22070338 0c9.88769531 0 16.47949193 6.59179662 16.47949193 16.47949193L841.589844 697.1103513099999z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="preview" unicode="" d="M491.343533 212.40738798999996c-144.109142 0-261.096577 173.524079-261.096577 179.39888 0 6.523577 116.987435 180.040493 261.096577 180.040493 144.760988 0 263.693728-181.025936 261.74125899-180.040493C751.11697499 393.44048699 636.104521 212.40738798999996 491.343533 212.40738798999996L491.343533 212.40738798999996 491.343533 212.40738798999996 491.343533 212.40738798999996zM490.359113 514.34923099c-61.108776 0-110.446461-53.270251-110.446461-119.608122 0-65.689095 49.337685-119.248941 110.446461-119.248941 61.435211 0 111.106494 53.559846 111.106494 119.248941C601.46663 461.08000399 551.795347 514.34923099 490.359113 514.34923099L490.359113 514.34923099 490.359113 514.34923099 490.359113 514.34923099zM490.04188799 342.45118599c-29.097712 0-52.622498 25.494651-52.62249799 56.543807 0 31.05325 23.541159 56.196906 52.62249799 56.196906 29.067013 0 52.277644-25.142633 52.27764401-56.196906C542.31953099 367.94583699 519.10889999 342.45118599 490.04188799 342.45118599L490.04188799 342.45118599 490.04188799 342.45118599 490.04188799 342.45118599zM490.04188799 342.45118599M845.475016 823.27513899c-73.579809 0-133.237537-59.648518-133.23753701-133.225257 0-73.579809 59.657728-133.228327 133.23753701-133.228327 73.576739 0 133.233444 59.648518 133.233444 133.228327C978.70846 763.62662099 919.05175499 823.27513899 845.475016 823.27513899L845.475016 823.27513899zM907.560026 720.0286609899999c-3.413749 0-6.682189 0.537236-9.779737 1.538029l-34.13135501-59.529815c7.270591-6.92062 11.794627-16.676821 11.79462701-27.494191 0-20.945031-16.97051-37.916565-37.907355-37.916565-20.939915 0-37.910425 16.971533-37.91042501 37.916565 0 9.342786 3.382027 17.899672 9.002025 24.49488l-21.225417 19.398816c-3.330862-1.642406-7.04751-2.572592-10.967796-2.572592-13.685697 0-24.76401 11.081383-24.76401 24.762987 0 13.670348 11.078313 24.750707 24.76401 24.750707 13.667278 0 24.749684-11.079336 24.74968401-24.750707 0-5.489014-1.795902-10.562567-4.826935-14.667048l21.08113099-19.262716c5.858428 3.64297 12.747325 5.747911 20.09875701 5.747911 5.937223 0 11.523451-1.356904 16.539698-3.77907l33.511231 58.459437c-7.175423 5.815449-11.746532 14.673188-11.74653201 24.626887 0 17.509792 14.20963 31.718399 31.71839901 31.718399 17.526165 0 31.717376-14.208607 31.717376-31.718399C939.277402 734.23419699 925.08619199 720.0286609899999 907.560026 720.0286609899999L907.560026 720.0286609899999zM894.305141 713.62071699M845.475016 498.03875399c-0.206708 0-0.397043 0.030699-0.60375101 0.030699l0-327.000566c0-25.508977-20.685111-46.162366-46.179762-46.162366L184.680155 124.90652098999999c-25.51 0-46.187949 20.654412-46.187949 46.162366L138.492206 613.20572699c0 25.494651 20.677948 46.139853 46.187949 46.139853l471.457632 0c-1.620917 10.019191-2.683109 20.225647-2.68310901 30.704302 0 10.05603 1.000793 19.848047 2.49379701 29.485545L135.35781899 719.53542699c-27.637454 0-50.068326-22.423709-50.068326-50.069349l0-554.673915c0-27.635407 22.430872-50.068326 50.068326-50.068326l712.63964601 0c27.652803 0 50.069349 22.432918 50.069349 50.068326L898.06681499 505.51502899C881.33371199 500.75256199 863.72875199 498.03875399 845.475016 498.03875399z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="on" unicode="" d="M932 654L92 654c-33.135 0-60-26.865-60-60l0-420c0-33.135 26.865-60 60-60l840 0c33.135 0 60 26.865 60 60L992 594C992 627.135 965.135 654 932 654zM947 204c0-33.135-11.865-45-45-45L122 159c-33.135 0-45 11.865-45 45L77 564c0 33.135 11.865 45 45 45l780 0c33.135 0 45-11.865 45-45L947 204zM842 564L602 564c-33.135 0-60-26.865-60-60l0-240c0-33.135 26.865-60 60-60l240 0c33.135 0 60 26.865 60 60L902 504C902 537.135 875.135 564 842 564z" horiz-adv-x="1024" />
|
||||
@ -35,13 +47,10 @@ Created by iconfont
|
||||
<glyph glyph-name="off" unicode="" d="M932 654L92 654c-33.135 0-60-26.865-60-60l0-420c0-33.135 26.865-60 60-60l840 0c33.135 0 60 26.865 60 60L992 594C992 627.135 965.135 654 932 654zM947 204c0-33.135-11.865-45-45-45L122 159c-33.135 0-45 11.865-45 45L77 564c0 33.135 11.865 45 45 45l780 0c33.135 0 45-11.865 45-45L947 204zM422 564L182 564c-33.135 0-60-26.865-60-60l0-240c0-33.135 26.865-60 60-60l240 0c33.135 0 60 26.865 60 60L482 504C482 537.135 455.135 564 422 564z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="yanse" unicode="" d="M190.35392 343.57557333m-26.88 0a26.25 26.25 0 1 1 53.76 0 26.25 26.25 0 1 1-53.76 0ZM246.99392 479.34453333m-42.15456 0a41.1665625 41.1665625 0 1 1 84.30912 0 41.1665625 41.1665625 0 1 1-84.30912 0ZM414.98144 589.8136533300001m-54.39456 0a53.1196875 53.1196875 0 1 1 108.78912 0 53.1196875 53.1196875 0 1 1-108.78912 0ZM634.66496 589.8136533300001m-68.31456 0a66.7134375 66.7134375 0 1 1 136.62912 0 66.7134375 66.7134375 0 1 1-136.62912 0ZM980.85344 656.35125333l-0.7248 0.62976c-10.00608 8.69088-25.16544 7.62432-33.85632-2.38272L584.2784 237.78645332999997l-45.76224-89.9808 82.09824 57.15168 362.62272 417.5376C991.928 632.50197333 990.86048 647.6613333299999 980.85344 656.35125333zM918.83552 424.53333333c-12.87456 0-23.42016-9.9408-24.3984-22.5648l-0.08064 0.00576c0 0-33.92064-179.84064-181.76064-275.83968-159.50016-103.57056-342.07872-56.9616-375.9984 2.87808-18.63936 32.88288-47.04 88.32-63.19968 101.76096-43.39584 36.09408-153.12-13.92-176.16 40.8-42.82176 101.7024 58.24032 365.28 308.80032 430.56 175.3008 46.46592 324.56736-9.50976 399.43872-71.88l0 0.0096c4.152-3.5424 9.53568-5.68608 15.42144-5.68608 13.1328 0 23.77824 10.64544 23.77824 23.77824 0 7.88352-3.83904 14.86752-9.74784 19.19424C803.3984 694.0542933300001 604.4912 846.17397333 326.6768 721.3336533300001c-303.36-136.32-322.56-420.48-259.2-491.52s156.09408-14.84736 176.64-38.4c13.12032-15.04032 30.21408-54.96576 52.63968-91.20096 32.47968-52.47936 194.92416-162.68352 442.7184-15.67872 148.69824 88.21536 201.91968 291.35904 203.83968 313.59936l-0.0816 0.00672c0.04896 0.63168 0.0816 1.26912 0.0816 1.91328C943.31552 413.57301333 932.3552 424.53333333 918.83552 424.53333333z" horiz-adv-x="1037" />
|
||||
|
||||
|
||||
<glyph glyph-name="download" unicode="" d="M391.38165448 725.93326272l240.95928598 0 0-64.1844201-240.95928598 0 0 64.1844201ZM391.38165448 788.7264396l240.95928598 0 0-33.48092532-240.95928598 0 0 33.48092532ZM861.69471958 252.86553432999995L833.07556085 93.04951446999996 190.59307034 93.04951446999996 162.00173642 252.86553432999995 90.5339419 252.86553432999995 90.5339419-1.8628535200000442 933.85644986-1.8628535200000442 933.85644986 252.86553432999995ZM843.99050449 537.55120495L632.34094046 537.55120495 632.34094046 629.63133654 391.38165448 629.63133654 391.38165448 536.8294444 182.40918149 536.8294444 511.15260556 176.78976975Z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="close" unicode="" d="M822.00345 119.17756599999996l0.022513 0.022513L246.50423 694.6829250000001c-5.78782 5.791913-13.785981 9.374508-22.621207 9.374508-17.662265 0-31.980365-14.3181-31.980365-31.980365 0-8.834202 3.582595-16.832364 9.373485-22.620184L776.11226 74.66067599999997c5.838985-6.277984 14.166651-10.209526 23.416316-10.209526 17.662265 0 31.980365 14.3181 31.980365 31.980365C831.508941 105.33223299999997 827.871087 113.37951299999997 822.00345 119.17756599999996zM776.783549 694.551942l-0.022513 0.022513L201.278189 119.05272200000002c-5.791913-5.78782-9.374508-13.785981-9.374508-22.621207 0-17.662265 14.3181-31.980365 31.980365-31.980365 8.834202 0 16.832364 3.582595 22.620184 9.373485l574.797231 574.836117c6.277984 5.838985 10.209526 14.166651 10.209526 23.416316 0 17.662265-14.3181 31.980365-31.980365 31.980365C790.628882 704.057433 782.580578 700.41958 776.783549 694.551942z" horiz-adv-x="1024" />
|
||||
<glyph glyph-name="bold" unicode="" d="M414.43029135 69.92901042999995L418.38184079 69.36452961999998C441.71467202 68.23550699999998 459.02592692 67.67102620000003 470.31597166 67.67102620000003 538.05654134 67.67102620000003 587.35586019 79.99584066 618.21544841 104.64589520000004 649.07503663 129.29588948000003 664.50464844 168.90471922999996 664.50464844 223.47347979999995 664.50464844 272.77358888000003 650.01591958 309.55989258 621.03797445 333.83360675999995 592.06009113 358.10732017 548.59390382 370.24399495 490.63807536 370.24399495 473.70291749 370.24399495 459.59052977 370.05579425999997 448.30042478 369.67945312999996 437.01031903 369.30317302000003 425.72039634 368.73863119 414.43029135 367.98594969L414.43029135 69.92901042999995ZM414.99483317 435.16167397C418.00549966 434.78533284 421.76878663 434.50312257 426.28487791 434.31492187 430.80090739 434.1267822 437.38666016 434.0327116 446.04243978 434.0327116 506.25625324 434.0327116 550.56919188 446.16938638 578.98259442 470.44303954 607.39599771 494.71675296 621.60251629 532.6320792700001 621.60251629 584.19017335 621.60251629 629.35053305 608.43088948 662.84395998 582.08733074 684.67148924 555.74383303 706.49901772 515.28825195 717.41259928 460.71949138 717.41259928 451.68737062 717.41259928 437.38684246 716.6599780399999 417.81729898 715.15461427L414.43029135 715.15461427 414.99483317 435.16167397ZM177.33954344 779.5078125L524.50814777 779.5078125C609.56021646 779.5078125 673.53646484 764.36047199 716.4387793 734.06542482 759.34115477 703.7703174000001 780.79197751 658.51655759 780.79197751 598.30274414 780.79197751 552.7660433 766.86778973 514.66251629 739.018868 483.99112875 711.16994627 453.31968097 670.14994465 430.83390544 615.95746418 416.53313395 682.19267087 415.40411133 733.74997394 398.46925781 770.63095541 365.72796469 807.51193766 332.98667235000005 825.95215414 287.82698160999996 825.95215414 230.24755453 825.95215414 157.23827310000001 800.92618488 101.25907064 750.87339354 62.30824461999998 700.82066244 23.357417820000023 628.75329754 3.882309540000051 534.66923014 3.882309540000051L177.33954344 3.882309540000051 177.33954344 60.33246988999997 245.64429035 66.54200358000003 264.2728296 84.60606201999997 264.2728296 701.04204426 245.64429035 717.41259928 177.33954344 723.05765139 177.33954344 779.5078125Z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="group" unicode="" d="M34.45656213 145.22855360000005l397.95204694 0L432.408608 622.7725376000001 34.45656213 622.7725376000001 34.45656213 145.22855360000005zM87.5167616 569.71233813l291.83055467 0 0-371.4224928-291.83055467 0L87.5167616 569.71233813zM591.58920853 622.7725376000001l0-477.543984 397.95313814 0L989.54234667 622.7725376000001 591.58920853 622.7725376000001zM936.4832384 198.28875413000003l-291.83055467 0L644.65268373 569.71233813l291.83055467 0L936.4832384 198.28875413000003zM565.0585632 808.48378347c0 29.302032-23.73088 53.06020053-53.05910827 53.06020053-29.27583573 0-53.06020053-23.75816853-53.06020053-53.06020053 0-19.63110613 10.68167893-36.75934187 26.53064533-45.93689707L485.46989973 5.454204799999957c-15.8489664-9.17755627-26.53064533-26.3068832-26.53064533-45.93689707 0-29.3031232 23.7843648-53.06020053 53.06020053-53.06020053 29.32822827 0 53.05910827 23.75816853 53.05910827 53.06020053 0 19.63983787-10.66748907 36.77571413-26.53064533 45.95108694L538.5279168 762.5326965300001C554.39107307 771.70697813 565.0585632 788.8428544 565.0585632 808.48378347z" horiz-adv-x="1024" />
|
||||
@ -50,7 +59,13 @@ Created by iconfont
|
||||
<glyph glyph-name="img" unicode="" d="M427.6145024 231.03597014000002L349.16493547 339.57724800999995C338.77152641 353.95736426999997 321.92075947 353.95721601 311.52745601 339.57724800999995L166.90305387 139.47777068000005C156.5096448 125.09765333999997 162.71110507 113.44053226999995 180.7541664 113.44053226999995L443.41864427 113.44053226999995 843.36921812 113.44053226999995C861.4224096 113.44053226999995 867.48577707 125.07215999000005 856.99141332 139.42049921L627.80094081 452.779408C617.23710081 467.22273919 600.2918496 467.1277472 589.79748587 452.779408L427.6145024 231.03597014000002 427.6145024 231.03597014000002ZM257.35579521 559.0678912000001a62.29333333 62.29333333 0 1 1 127.32210239 0 62.29333333 62.29333333 0 1 1-127.32210239 0ZM82.22029653 718.22051947L941.77970453 718.22051947C932.83477333 718.22051947 925.79683307 725.3427648100001 925.79683307 734.07920001L925.79683307 33.92079998999998C925.79683307 42.675572269999975 932.86973547 49.77948053 941.77970453 49.77948053L82.22029653 49.77948053C91.16522667 49.77948053 98.20316693 42.65723519000005 98.20316693 33.92079998999998L98.20316693 734.07920001C98.20316693 725.32442773 91.1302656 718.22051947 82.22029653 718.22051947ZM34.54211628 33.92079998999998C34.54211628 7.666775479999956 55.83539627-13.88157013 82.22029653-13.88157013L941.77970453-13.88157013C968.0912512-13.88157013 989.45788372 7.578731729999959 989.45788372 33.92079998999998L989.45788372 734.07920001C989.45788372 760.3332245199999 968.16460373 781.88157013 941.77970453 781.88157013L82.22029653 781.88157013C55.9087488 781.88157013 34.54211628 760.42126827 34.54211628 734.07920001L34.54211628 33.92079998999998Z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="strong" unicode="" d="M270.528 1.5359999999999445V766.4639999999999h224.704c67.136 0 120.768-16.064 160.896-48.128 40.256-32.064 60.224-74.624 60.224-127.616 0-42.176-11.904-79.36-35.776-111.616-23.872-32.256-56.768-55.168-98.496-68.672v-1.984c52.032-5.888 93.504-25.6 124.608-59.008s46.72-75.84 46.72-127.104c0-65.856-23.616-119.104-70.848-159.744-47.232-40.704-107.776-60.992-181.504-60.992H270.528zM369.28 680v-239.488h89.856c47.744 0 85.184 11.648 112.32 34.816 27.2 23.232 40.768 55.424 40.768 96.576 0 72.064-48.064 108.16-144.192 108.16H369.28z m0-325.376v-266.624h118.528c51.648 0 91.584 11.968 119.68 35.776 28.096 23.872 42.24 57.088 42.24 99.52 0 87.552-59.392 131.392-178.24 131.392H369.28z" horiz-adv-x="1024" />
|
||||
<glyph glyph-name="under-line" unicode="" d="M166.12017822 73.63925171000005h684.40402222v-57.03552246H166.12017822v57.03552246z m0 684.40237427h294.74972535v-44.84481812l-63.66192628-4.48406982-14.53656005-13.00396729v-321.53302002c0-61.28723145 13.0328064-105.0856018 39.09924316-131.39511108 26.06643677-26.3053894 68.83895874-39.46426391 128.32580567-39.46426392 54.80667114 0 94.48928833 13.97872925 119.05197143 41.93206787 24.5626831 27.95745849 36.84402466 73.7663269 36.84402466 137.4472046V692.12118531l-15.54016114 15.69424438-65.66665649 5.38055419V758.0416259799999h233.09335328v-44.84481812l-62.66326905-5.38055419-14.03640747-15.69424439v-318.84439087c0-85.20309448-21.38626099-146.93939209-64.16290283-185.20394898-42.77252198-38.26950073-111.78451538-57.40219117-207.02114869-57.40219115-49.79690552 0-93.48980713 6.50527954-131.08364868 19.50759887-37.5954895 13.00643921-67.0880127 31.61178589-88.47592163 55.83251953-16.37402344 19.13269043-27.98794555 41.03393555-34.83764649 65.69549561-6.85134888 24.66567993-10.27661133 60.01831055-10.27661132 106.05789184V695.70794677l-14.53656006 13.00396729-64.66305542 4.48406982V758.0416259799999z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="checked1" unicode="" d="M810.666667 768H213.333333c-47.146667 0-85.333333-38.186667-85.333333-85.333333v-597.333334c0-47.146667 38.186667-85.333333 85.333333-85.333333h597.333334c47.146667 0 85.333333 38.186667 85.333333 85.333333V682.666667c0 47.146667-38.186667 85.333333-85.333333 85.333333zM426.666667 170.66666699999996L213.333333 384l60.373334 60.373333L426.666667 291.41333299999997l323.626666 323.626667L810.666667 554.666667 426.666667 170.66666699999996z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="close" unicode="" d="M869.16373333 77.84106667000003l-303.82826666 303.82826666 303.82826666 303.95733334c14.62826667 14.62826667 14.62826667 38.448 0 53.07626666s-38.448 14.62826667-53.07626666 0l-303.82826667-303.82826666-303.95733333 303.82826666c-14.62826667 14.62826667-38.448 14.62826667-53.07626667 0s-14.62826667-38.448 0-53.07626666l303.95733333-303.95733334-303.95733333-303.82826666c-14.62826667-14.62826667-14.62826667-38.448 0-53.07626667s38.448-14.62826667 53.07626667 0l303.95733333 303.95733333 303.95733333-303.95733333c14.62826667-14.62826667 38.448-14.62826667 53.07626667 0 14.4992 14.62826667 14.4992 38.448-0.13013333 53.07626667z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="italic" unicode="" d="M529.86255689 686.13901881c3.17041097 15.82995963 0.67384989 27.45111514-7.63328765 34.97393593-8.28504494 7.5228208-25.17549033 12.83629586-50.46144746 16.00670683-11.09091393 2.37504665-16.60323006 8.69377339-16.60323005 18.96723041 0 2.35295277 0.38663585 4.9157929 1.25932683 7.72166188 0.77327042 2.75063491 1.55758845 6.11988697 2.33085887 10.07461464 23.71732241-2.36399906 46.9817286-4.14252247 69.94787316-5.34661653 22.95509827-1.14886 44.27528016-1.77852341 64.03787359-1.77852212 16.61427636 0 36.78559952 0.62966341 60.41454768 1.77852212 23.72836869 1.20409277 46.31892499 2.99366247 67.63910688 5.34661653 1.53549456-7.90945667 2.30876628-13.84154884 2.30876629-17.79627652 0-11.04672615-5.47917596-16.98986592-16.59218376-17.75209006-25.28595715-3.18145726-43.02699962-8.73796115-53.35568941-16.59218377-10.25136183-7.90945667-16.97881834-19.77364101-20.14922928-35.60359934L515.67855995 76.77948738999999c-3.19250356-15.82995963-0.38663585-27.25227405 8.29609124-34.38846029 8.6716808-7.10304476 26.41272325-12.64850238 53.3556894-16.59218375 10.22926924-2.37504665 15.41018358-8.30713883 15.41018359-17.75208876 0-4.78323218-0.83955078-11.09091393-2.39713924-18.96723041a1387.5240922 1387.5240922 0 0 1-72.25663816 5.30242877 1364.38120044 1364.38120044 0 0 1-66.4681543 1.7785234c-16.59218377 0-36.57571215-0.57442935-59.82907074-1.7785234-23.34173284-1.14886-45.63402752-2.949476-66.95421069-5.30242877-1.6349151 7.87631649-2.41923312 14.18399693-2.41923312 18.96723041 0 9.44495123 4.750092 14.99040754 14.19504452 16.59218247 25.37433139 3.95472769 43.51305602 9.64379231 54.59292235 17.17766069 10.99149339 7.5338671 18.13872462 19.14397761 21.30913558 34.97393594l117.34937651 609.34848512z" horiz-adv-x="1024" />
|
||||
@ -59,43 +74,40 @@ Created by iconfont
|
||||
<glyph glyph-name="overline" unicode="" d="M837.8784338 392.6585736h-651.7568676a27.61681602 27.61681602 0 1 1 0-55.23363334h651.7568676a27.61681602 27.61681602 0 1 1 0 55.23363334zM642.50602786 31.309099859999947c-29.74883513 3.32506427-55.68654829 8.08620386-68.2466764 14.39388431-12.57117442 6.27454027-23.59580798 17.00091221-23.59580798 32.23434862V293.23803435h-88.37381311v-215.30070156c0-15.23343638-4.28612948-25.78305985-17.50906121-31.73724592s-33.51576802-10.91416543-63.28669702-14.89098701c-6.60594207-1.3145609-9.32343681-6.62803595-9.32343681-15.86309981 0-4.63962516 0.91687873-10.25136183 2.27562481-16.8462576 21.14343469 1.3145609 43.93283205 2.46341959 68.09202309 3.46867258a1716.09792816 1716.09792816 0 0 0 141.91729601 0c23.45220097-1.01629929 45.78868212-2.15411168 66.96525698-3.46867258 1.29246701 6.60594207 1.99945709 12.20663245 1.99945708 16.8462576 0 10.58276364-3.63437348 15.86309981-10.91416544 15.86309981zM224.48684676 623.9217942099999a12.15139967 12.15139967 0 0 1 6.42919486 6.93734386 656.28602594 656.28602594 0 0 0 22.80044368 43.65666433c7.29083955 12.53803424 15.88519239 22.81148996 25.80515373 30.73199292 9.89786746 7.94259684 21.64053738 11.40022183 35.21696479 15.36599712 13.53223964 3.96577526 30.24593782 3.44657869 50.0748116 3.44657869H462.28973037v-287.21489162h88.37381311v287.21489162h111.67135817c19.82887378 0 36.53152438 0.51919658 50.07481162-3.44657869 13.55433353-3.95472769 25.10920996-8.6716808 34.74195597-16.61427765a109.78236923 109.78236923 0 0 0 25.26386326-30.10232951 442.53186655 442.53186655 0 0 0 21.83937845-43.33630882c1.3145609-3.31401797 3.62332589-5.46812965 6.92629757-6.78268926 3.32506427-1.3256072 6.29663415-1.90003654 8.93680224-1.90003783 3.96577526 0 7.44549414 0.69594378 10.41706274 2.02155095 2.98261618 1.3256072 6.10883937 2.67330827 9.43390493 3.98786917-7.29083955 22.46904187-12.40547351 42.99385943-15.388091 61.50817362a997.55255074 997.55255074 0 0 1-8.43969824 46.61718533c-2.65121438 12.56012813-5.45708336 22.31438726-8.41760566 29.26277871-2.98261618 6.93734386-7.78794224 10.40601645-14.39388559 10.40601646-5.29138246 0-12.08511932-0.3424481-20.3259765-1.0052517-8.28504494-0.66280359-17.34336031-1.3256072-27.27436793-1.98841079-9.91996004-0.66280359-19.85096767-2.05469115-29.74883512-2.72854103-9.91996004-0.66280359-18.83466839-1.71224305-26.77726525-1.71224306H347.93401634c-8.58330656 0-17.840463 1.06048575-27.74937675 1.71224306-9.94205392 0.67384989-19.67422048 1.69014917-29.27382502 2.35295276-9.57751195 0.67384989-18.68001508 1.51340197-27.27436795 2.17620428-8.58330656 0.66280359-15.21134251 1.09362593-19.82887507 1.09362593-6.62803595 0-11.41126813-3.28087779-14.39388431-9.88681987-2.96052229-6.62803595-5.77743757-16.00670683-8.41760565-28.24647944-2.65121438-12.22872633-5.63383056-27.60576973-8.93680224-46.10903763-3.32506427-18.51431419-8.28504494-39.65774886-14.890987-63.46344422 5.30242877-3.96577526 11.56592274-5.95418606 18.85676227-5.95418477 2.65121438 0.01104629 5.45708336 0.66280359 8.46179214 1.99945708z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="exit-full-screen" unicode="" d="M142.4 799.2l-44.8-44.8 173.6-174.4-68-68H384V692.8l-67.2-67.2zM752.8 580l173.6 174.4-44.8 44.8-174.4-173.6-67.2 67.2V512h180.8zM270.4 188.79999999999995l-169.6-170.4 44.8-49.6 170.4 174.4 68-68V256H203.2zM820.8 256H640v-180.8l68 68 170.4-174.4 44.8 49.6-169.6 170.4z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="horizontal" unicode="" d="M962.23301298 384c0-28.40586801-23.07976821-51.48563623-51.48563622-51.48563623l-804.59622112 0c-28.40586801 0-51.48563623 23.07976821-51.48563623 51.48563623s23.07976821 51.48563623 51.48563623 51.48563623L910.74737676 435.48563623c28.40586801 0 51.48563623-23.07976821 51.48563622-51.48563623z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="theme" unicode="" d="M412.99413333 774.11946667h-271.33866666c-12.9152 0-23.3856-10.46933333-23.3856-23.38453334v-271.3408c0-39.01546667 31.74293333-70.7552 70.75733333-70.7552h271.33866667c12.9152 0 23.38453333 10.46933333 23.38453333 23.38453334V703.36426667c0 39.0144-31.7408 70.7552-70.75626667 70.7552z m23.9872-318.71253334H189.0272c-13.22666667 0-23.9872 10.76053333-23.9872 23.98613334V727.34933333h247.95733333c13.22346667 0 23.98506667-10.76053333 23.98506667-23.98613333v-247.95733333zM878.7168 690.21013333c-12.9152 0-23.38346667-10.46933333-23.38346667-23.38453333v-187.43146667c0-13.22666667-10.76266667-23.98613333-23.98933333-23.98613333H583.38986667V703.3632c0 13.2256 10.75946667 23.98613333 23.9872 23.98613333h185.96906666c12.9152 0 23.38346667 10.46933333 23.38346667 23.38453334 0 12.9152-10.46933333 23.38453333-23.38346667 23.38453333H607.376c-39.01546667 0-70.7552-31.7408-70.7552-70.75626667V432.02133333c0-12.9152 10.46933333-23.38453333 23.38346667-23.38453333h271.33866666c39.0176 0 70.75733333 31.7408 70.75733334 70.7552V666.82453333c0 12.91733333-10.46826667 23.3856-23.38346667 23.3856zM830.96853333 355.73013332999994H559.62773333c-12.9152 0-23.38346667-10.46933333-23.38346666-23.38453333v-271.3408c0-39.0144 31.7408-70.7552 70.75733333-70.7552h271.33866667c12.9152 0 23.38453333 10.46933333 23.38453333 23.38453333V284.97493333c0 39.0144-31.7408 70.7552-70.75626667 70.7552z m23.98613334-318.7104H607.0016c-13.22666667 0-23.98933333 10.76053333-23.98933333 23.98506667V308.96106667000004h247.95733333c13.22453333 0 23.984-10.76053333 23.984-23.98613334v-247.9552zM460.36586667 355.73013332999994h-271.33866667c-39.01546667 0-70.75733333-31.7408-70.75733333-70.75626666v-271.33973334c0-12.91626667 10.47146667-23.38453333 23.3856-23.38453333h271.3408c39.01333333 0 70.75413333 31.7408 70.75413333 70.7552V332.3456c0 12.9152-10.46933333 23.38453333-23.38453333 23.38453333zM436.98133333 61.004800000000046c0-13.22666667-10.7616-23.98506667-23.98506666-23.98506667h-247.95733334V284.97493333c0 13.2256 10.7616 23.98613333 23.9872 23.98613334H436.98133333v-247.95626667zM878.7168 723.71946667c14.896 0 27.0144 12.1184 27.0144 27.01546666 0 14.896-12.1184 27.01546667-27.0144 27.01546667s-27.01653333-12.11946667-27.01653333-27.01546667c0-14.896 12.12053333-27.01546667 27.01653333-27.01546666z" horiz-adv-x="1025" />
|
||||
|
||||
|
||||
<glyph glyph-name="quote" unicode="" d="M310.726085 360.026512h151.998727v-290.768856H171.941361V326.98420899999996c-8.876637 162.934578 72.698904 286.334186 244.522282 370.071112l66.084604-99.123259c-110.173443-57.307705-167.481148-136.606312-171.825811-237.90555h0.003649z m370.084491 0h152.001159v-290.768856h-290.783451V326.98420899999996c-8.883935 162.934578 72.696471 286.334186 244.519849 370.071112l66.087038-99.123259c-114.611762-61.754538-171.824595-141.054361-171.824595-237.90555z m0 0" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="table" unicode="" d="M513.7 775.9h385.5c44.3 0 59.5-15 59.5-59 0-221.1 0-442.3-0.1-663.4 0-44.6-14.8-59.6-58.8-59.6-259.2-0.1-518.5-0.1-777.7 0-41 0-57.1 15.7-57.1 56.8-0.2 223.4-0.2 446.8 0 670.1 0 39.6 16.2 55 56.5 55.1 130.7 0.1 261.4 0 392.2 0zM345.3 202.79999999999995h-222v-150.7h222V202.79999999999995z m277-151.6V202.10000000000002H401.5v-150.9h220.8z m55.9 1.2h222.2V202.5H678.2v-150.1zM123.6 405.1v-149.4h221V405.1h-221zM678 253.70000000000005c72.4 0 142.3-0.2 212.2 0.5 3.8 0 10.7 6.6 10.7 10.3 0.7 46.7 0.5 93.3 0.5 139.8H677.9c0.1-50.4 0.1-98.7 0.1-150.6z m-277.5 1.8h222.1V404.4H400.5v-148.9z m-55.7 200.9V606.6H121.9c0-46.8-0.5-91.5 0.6-136.1 0.1-4.8 9.2-13.4 14.2-13.5 68.6-0.9 137.3-0.6 208.1-0.6z m56.3 2.1h221V607.2h-221v-148.7z m498.8-0.7V607.3H678.5v-149.5h221.4z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="preview" unicode="" d="M510.72 226.88c-90.24 0-164.8 73.06666667-164.8 164.8s74.45333333 163.30666667 164.8 163.30666667 164.8-73.06666667 164.8-164.8-73.17333333-163.30666667-164.8-163.30666667z m0 277.97333333c-63.04 0-113.17333333-50.13333333-113.17333333-113.17333333s50.13333333-113.17333333 113.17333333-113.17333333 113.17333333 50.13333333 113.17333333 113.17333333-50.13333333 113.17333333-113.17333333 113.17333333zM787.94666667 592.3199999999999m-26.66666667 0a26.66666667 26.66666667 0 1 1 53.33333333 0 26.66666667 26.66666667 0 1 1-53.33333333 0ZM896.32 526.0799999999999l-38.4-34.24c37.86666667-42.66666667 59.73333333-81.6 59.73333333-100.90666667 0-55.89333333-183.36-276.48-406.93333333-276.48S103.78666667 336.53333333 103.78666667 390.93333333s183.36 276.48 406.93333333 276.48c97.70666667 0 187.84-42.24 258.24-94.29333333l33.70666667 41.28c-79.46666667 61.01333333-181.33333333 109.01333333-291.94666667 109.01333333C258.56 723.41333333 52.26666667 474.13333333 52.26666667 390.93333333c0-110.29333333 206.29333333-332.37333333 458.45333333-332.37333333s458.45333333 249.28 458.45333333 332.37333333c0 29.97333333-26.77333333 81.49333333-72.85333333 135.14666667zM879.68 505.92m-25.81333333 0a25.81333333 25.81333333 0 1 1 51.62666666 0 25.81333333 25.81333333 0 1 1-51.62666666 0Z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="full-screen" unicode="" d="M611.03217778 453.90506667c-8.73813333 0-14.56355555 2.91271111-20.38897778 8.73813333-11.65084445 11.65084445-11.65084445 29.12711111 0 40.77795555l250.49315555 250.49315556c11.65084445 11.65084445 29.12711111 11.65084445 40.77795556 0s11.65084445-29.12711111 0-40.77795556l-250.49315556-250.49315555c-5.82542222-5.82542222-14.56355555-8.73813333-20.38897777-8.73813333zM867.35075555 573.32622222c-17.47626667 0-29.12711111 11.65084445-29.1271111 29.12711111V710.2236444499999h-107.77031112c-17.47626667 0-29.12711111 11.65084445-29.12711111 29.1271111s11.65084445 29.12711111 29.12711111 29.12711112h136.89742222c17.47626667 0 29.12711111-11.65084445 29.12711112-29.12711112v-136.89742222c0-17.47626667-11.65084445-29.12711111-29.12711112-29.12711111zM159.56195555 5.347555550000038c-8.73813333 0-14.56355555 2.91271111-20.38897777 8.73813334-11.65084445 11.65084445-11.65084445 29.12711111 0 40.77795556l250.49315555 250.49315555c11.65084445 11.65084445 29.12711111 11.65084445 40.77795556 0s11.65084445-29.12711111 0-40.77795555l-250.49315556-250.49315556c-5.82542222-5.82542222-11.65084445-8.73813333-20.38897778-8.73813334zM293.54666667-0.4778666700000258H156.64924445c-17.47626667 0-29.12711111 11.65084445-29.12711112 29.12711112v136.89742222c0 17.47626667 11.65084445 29.12711111 29.12711112 29.12711111s29.12711111-11.65084445 29.1271111-29.12711111v-107.77031112h107.77031112c17.47626667 0 29.12711111-11.65084445 29.12711111-29.1271111s-11.65084445-29.12711111-29.12711111-29.12711112zM861.52533333 2.434844450000014c-8.73813333 0-14.56355555 2.91271111-20.38897778 8.73813333l-250.49315555 250.49315555c-11.65084445 11.65084445-11.65084445 29.12711111 0 40.77795556s29.12711111 11.65084445 40.77795555 0l250.49315556-250.49315556c11.65084445-11.65084445 11.65084445-29.12711111 0-40.77795555-5.82542222-5.82542222-14.56355555-8.73813333-20.38897778-8.73813333zM867.35075555-0.4778666700000258h-136.89742222c-17.47626667 0-29.12711111 11.65084445-29.12711111 29.12711112s11.65084445 29.12711111 29.12711111 29.1271111h107.77031112v107.77031112c0 17.47626667 11.65084445 29.12711111 29.1271111 29.12711111s29.12711111-11.65084445 29.12711112-29.12711111v-136.89742222c0-17.47626667-11.65084445-29.12711111-29.12711112-29.12711112zM412.96782222 453.90506667c-8.73813333 0-14.56355555 2.91271111-20.38897777 8.73813333L139.17297778 713.13635555c-11.65084445 11.65084445-11.65084445 29.12711111 0 40.77795556s29.12711111 11.65084445 40.77795555 0l250.49315556-250.49315556c11.65084445-11.65084445 11.65084445-29.12711111 0-40.77795555-2.91271111-5.82542222-11.65084445-8.73813333-17.47626667-8.73813333zM156.64924445 573.32622222c-17.47626667 0-29.12711111 11.65084445-29.12711112 29.12711111V739.35075555c0 17.47626667 11.65084445 29.12711111 29.12711112 29.12711112h136.89742222c17.47626667 0 29.12711111-11.65084445 29.12711111-29.12711112s-11.65084445-29.12711111-29.12711111-29.1271111H185.77635555v-107.77031112c0-17.47626667-14.56355555-29.12711111-29.1271111-29.12711111z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="checked" unicode="" d="M883.37066667 806.34346667H177.03786667c-43.69066667 0-80.0992-36.4096-80.0992-80.10026667V12.629333330000009c0-43.69066667 36.40853333-80.0992 80.0992-80.0992h713.61493333c43.69066667 0 80.0992 36.40853333 80.0992 80.0992V726.2432c-7.28213333 43.69066667-43.69066667 80.10026667-87.38133333 80.10026667z m29.12746666-786.432c0-14.56426667-14.56426667-29.12746667-29.12746666-29.12746667H177.03786667c-14.5632 0-29.1264 14.5632-29.1264 29.12746667V726.2432c0 14.56426667 14.5632 29.12746667 29.1264 29.12746667h713.61493333c14.5632 0 29.1264-14.5632 29.1264-29.12746667v-706.33173333h-7.28106667zM468.30933333 143.70133333c-14.5632 0-29.12746667 7.28213333-36.40853333 14.5632l-174.76266667 174.76266667c-21.84533333 21.84533333-21.84533333 58.25493333 0 80.10026667 21.84533333 21.84533333 58.25386667 21.84533333 80.0992 0l167.48053334-167.4816c21.84533333-21.84533333 21.84533333-58.25386667 0-80.0992-7.28106667-14.5632-21.84533333-21.84533333-36.40853334-21.84533334zM468.30933333 143.70133333c-14.5632 0-29.12746667 7.28213333-36.40853333 14.5632-29.12746667 29.12746667-29.12746667 58.25493333 0 80.10026667L766.86186667 580.608c21.84533333 21.84533333 58.25493333 21.84533333 80.10026666 0 21.84533333-21.84533333 21.84533333-58.25386667 0-80.0992L504.71786667 158.26453332999995c-7.28106667-7.28106667-21.84533333-14.5632-36.40853334-14.5632z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="clear" unicode="" d="M118.25 110.49999998999999h787.5v-56.25H118.25zM884.70019531 524.30664062L645.11035156 764.40624999a70.76953125 70.76953125 0 0 1-49.86914062 21.09375c-15.99609375 0-31.57910156-5.79199219-43.26855469-17.51660156L135.67871094 350.34472655c-24.609375-24.67089844-22.96582031-66.64746094 3.61230469-93.28710937L229.4140625 166.74999999h395.5078125l263.39941406 264.26953125c24.59179688 24.67089844 22.95703125 66.64746094-3.62109375 93.28710938zM601.55175781 222.99999999H252.72265625l-73.63476563 73.828125c-5.2734375 5.32617188-5.35253906 12.08496094-3.59472656 13.84277344L404.68554687 540.54003905l257.10644532-257.09765625z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="ul" unicode="" d="M149.3 746.7c47.1 0 85.3-38.2 85.3-85.3 0-47.1-38.2-85.3-85.3-85.3S64 614.2 64 661.3c0 47.2 38.2 85.4 85.3 85.4zM149.3 469.3c47.1 0 85.3-38.2 85.3-85.3s-38.2-85.3-85.3-85.3S64 336.9 64 384s38.2 85.3 85.3 85.3zM149.3 192c47.1 0 85.3-38.2 85.3-85.3 0-47.1-38.2-85.3-85.3-85.3S64 59.5 64 106.70000000000005c0 47.1 38.2 85.3 85.3 85.3zM362.7 704h554.7c23.6 0 42.7-19.1 42.7-42.7s-19.1-42.7-42.7-42.7H362.7c-23.6 0-42.7 19.1-42.7 42.7s19.1 42.7 42.7 42.7zM362.7 426.7h554.7c23.6 0 42.7-19.1 42.7-42.7s-19.1-42.7-42.7-42.7H362.7c-23.6 0-42.7 19.1-42.7 42.7s19.1 42.7 42.7 42.7zM362.7 149.29999999999995h554.7c23.6 0 42.7-19.1 42.7-42.7s-19.1-42.7-42.7-42.7H362.7c-23.6 0-42.7 19.1-42.7 42.7s19.1 42.7 42.7 42.7z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="link" unicode="" d="M878 750C812 822 692 822 626 750L524 654c-60-66-66-162-18-234l-30-30c-72 48-168 42-234-18L146 270C74 198 74 84 146 18c72-72 186-72 252 0 0 0 108 108 108 114 48 60 54 150 6 216l30 30c72-48 168-42 228 18 0 0 108 108 108 114 72 72 66 174 0 240z m-420-594l-96-96c-48-48-126-48-168 0-48 48-48 126 0 168L290 324c42 42 102 48 144 18-12-12-12-30 0-42s30-12 42 0c24-42 18-102-18-144z m378 384L740 444c-36-36-96-42-144-18l6 6c12 12 12 30 0 42s-30 6-42-6l-6-6c-30 48-24 108 12 150l96 96c48 48 126 48 168 0 54-48 54-120 6-168z" horiz-adv-x="1024" />
|
||||
<glyph glyph-name="code" unicode="" d="M288.145625 154.39312500000005c-7.205625 0-14.431875 2.60625-20.165625 7.865625L45.374375 367.25250000000005a29.806875 29.806875 0 0 0-9.58875 21.890625 29.8125 29.8125 0 0 0 9.58875 21.890625l222.60375 204.995625c12.1275 11.1 30.9375 10.35375 42.05625-1.734375 11.139375-12.088125 10.363125-30.9075-1.725-42.046875L109.458125 389.143125l198.855-183.105c12.088125-11.139375 12.8625-29.95875 1.725-42.046875a29.67375 29.67375 0 0 0-21.8925-9.598125zM735.854375 148.27125c-8.019375 0-16.02 3.225-21.890625 9.598125-11.139375 12.088125-10.363125 30.91875 1.74375 42.046875l198.834375 183.095625-198.855 183.105c-12.088125 11.139375-12.8625 29.95875-1.725 42.046875 11.158125 12.0975 29.949375 12.834375 42.05625 1.734375l222.60375-204.995625a29.75625 29.75625 0 0 0-0.020625-43.78125l-222.6-204.98625a29.664375 29.664375 0 0 0-20.146875-7.86375zM394.20875 48.94124999999997c-3.6225 0-7.303125 0.6675-10.88625 2.071875-15.285 6.015-22.820625 23.285625-16.815 38.58L606.52625 700.18125c6.024375 15.30375 23.24625 22.820625 38.589375 16.805625 15.285-6.015 22.820625-23.285625 16.815-38.58L421.91 67.81875000000002c-4.610625-11.720625-15.826875-18.8775-27.70125-18.8775z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="code" unicode="" d="M288.145625 154.39312500000005c-7.205625 0-14.431875 2.60625-20.165625 7.865625L45.374375 367.25250000000005a29.806875 29.806875 0 0 0-9.58875 21.890625 29.8125 29.8125 0 0 0 9.58875 21.890625l222.60375 204.995625c12.1275 11.1 30.9375 10.35375 42.05625-1.734375 11.139375-12.088125 10.363125-30.9075-1.725-42.046875L109.458125 389.143125l198.855-183.105c12.088125-11.139375 12.8625-29.95875 1.725-42.046875a29.67375 29.67375 0 0 0-21.8925-9.598125zM735.854375 148.27125c-8.019375 0-16.02 3.225-21.890625 9.598125-11.139375 12.088125-10.363125 30.91875 1.74375 42.046875l198.834375 183.095625-198.855 183.105c-12.088125 11.139375-12.8625 29.95875-1.725 42.046875 11.158125 12.0975 29.949375 12.834375 42.05625 1.734375l222.60375-204.995625a29.75625 29.75625 0 0 0-0.020625-43.78125l-222.6-204.98625a29.664375 29.664375 0 0 0-20.146875-7.86375zM394.20875 48.94124999999997c-3.6225 0-7.303125 0.6675-10.88625 2.071875-15.285 6.015-22.820625 23.285625-16.815 38.58L606.52625 700.18125c6.024375 15.30375 23.24625 22.820625 38.589375 16.805625 15.285-6.015 22.820625-23.285625 16.815-38.58L421.91 67.81875000000002c-4.610625-11.720625-15.826875-18.8775-27.70125-18.8775z" horiz-adv-x="1024" />
|
||||
<glyph glyph-name="link" unicode="" d="M574 230.60000000000002c-3.1 3.1-8.2 3.1-11.3 0L446.5 114.39999999999998c-53.8-53.8-144.6-59.5-204 0-59.5 59.5-53.8 150.2 0 204l116.2 116.2c3.1 3.1 3.1 8.2 0 11.3l-39.8 39.8c-3.1 3.1-8.2 3.1-11.3 0L191.4 369.5c-84.6-84.6-84.6-221.5 0-306s221.5-84.6 306 0l116.2 116.2c3.1 3.1 3.1 8.2 0 11.3L574 230.60000000000002zM832.6 704.6c-84.6 84.6-221.5 84.6-306 0L410.3 588.4c-3.1-3.1-3.1-8.2 0-11.3l39.7-39.7c3.1-3.1 8.2-3.1 11.3 0l116.2 116.2c53.8 53.8 144.6 59.5 204 0 59.5-59.5 53.8-150.2 0-204L665.3 333.4c-3.1-3.1-3.1-8.2 0-11.3l39.8-39.8c3.1-3.1 8.2-3.1 11.3 0l116.2 116.2c84.5 84.6 84.5 221.5 0 306.1zM610.1 523.7c-3.1 3.1-8.2 3.1-11.3 0L372.3 297.29999999999995c-3.1-3.1-3.1-8.2 0-11.3l39.6-39.6c3.1-3.1 8.2-3.1 11.3 0l226.4 226.4c3.1 3.1 3.1 8.2 0 11.3l-39.5 39.6z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="fullscreen" unicode="" d="M275.2 677.9733333300001l46.82666667 46.82666667c5.01333333 5.01333333 2.02666667 13.65333333-5.01333334 14.50666667L146.13333333 759.46666667c-5.44 0.64-10.13333333-3.94666667-9.49333333-9.49333334L156.8 579.09333333c0.85333333-7.04 9.49333333-10.02666667 14.50666667-5.01333333l46.61333333 46.61333333L360.53333333 478.18666667c3.30666667-3.30666667 8.74666667-3.30666667 12.05333334 0l45.22666666 45.12c3.30666667 3.30666667 3.30666667 8.74666667 0 12.05333333L275.2 677.9733333300001zM651.41333333 478.18666667c3.30666667-3.30666667 8.74666667-3.30666667 12.05333334 0l142.61333333 142.50666666 46.61333333-46.61333333c5.01333333-5.01333333 13.65333333-2.02666667 14.50666667 5.01333333L887.36 749.86666667c0.64 5.44-3.94666667 10.13333333-9.49333333 9.49333333L706.98666667 739.2c-7.04-0.85333333-10.02666667-9.49333333-5.01333334-14.50666667l46.82666667-46.82666666L606.18666667 535.46666667c-3.30666667-3.30666667-3.30666667-8.74666667 0-12.05333334l45.22666666-45.22666666zM867.2 188.90666667000005c-0.85333333 7.04-9.49333333 10.02666667-14.50666667 5.01333333l-46.61333333-46.61333333L663.46666667 289.81333333c-3.30666667 3.30666667-8.74666667 3.30666667-12.05333334 0l-45.22666666-45.12c-3.30666667-3.30666667-3.30666667-8.74666667 0-12.05333333L748.8 90.02666667000005l-46.82666667-46.82666667c-5.01333333-5.01333333-2.02666667-13.65333333 5.01333334-14.50666667L877.86666667 8.533333330000005c5.44-0.64 10.13333333 3.94666667 9.49333333 9.49333334L867.2 188.90666667000005zM372.58666667 289.81333333c-3.30666667 3.30666667-8.74666667 3.30666667-12.05333334 0L217.92 147.30666667000003l-46.61333333 46.61333333c-5.01333333 5.01333333-13.65333333 2.02666667-14.50666667-5.01333333L136.64 18.133333330000028c-0.64-5.44 3.94666667-10.13333333 9.49333333-9.49333333L317.01333333 28.799999999999955c7.04 0.85333333 10.02666667 9.49333333 5.01333334 14.50666667L275.2 90.02666667000005 417.81333333 232.53333333c3.30666667 3.30666667 3.30666667 8.74666667 0 12.05333334l-45.22666666 45.22666666z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="quite" unicode="" d="M382.93333333 673.17333333c-0.85333333 7.04-9.49333333 10.02666667-14.50666666 5.01333334l-46.61333334-46.61333334L179.2 774.08c-3.30666667 3.30666667-8.74666667 3.30666667-12.05333333 0l-45.22666667-45.12c-3.30666667-3.30666667-3.30666667-8.74666667 0-12.05333333L264.53333333 574.29333333l-46.82666666-46.82666666c-5.01333333-5.01333333-2.02666667-13.65333333 5.01333333-14.50666667L393.6 492.8c5.44-0.64 10.13333333 3.94666667 9.49333333 9.49333333L382.93333333 673.17333333zM393.70666667 275.09333332999995L222.72 254.93333332999998c-7.04-0.85333333-10.02666667-9.49333333-5.01333333-14.50666666l46.82666666-46.82666667L121.92 51.200000000000045c-3.30666667-3.30666667-3.30666667-8.74666667 0-12.05333333l45.22666667-45.12c3.30666667-3.30666667 8.74666667-3.30666667 12.05333333 0L321.81333333 136.53333333l46.61333334-46.61333333c5.01333333-5.01333333 13.65333333-2.02666667 14.50666666 5.01333333l20.16 170.77333334c0.64 5.44-3.94666667 10.02666667-9.38666666 9.38666666zM630.29333333 492.90666667L801.28 513.06666667c7.04 0.85333333 10.02666667 9.49333333 5.01333333 14.50666666L759.46666667 574.29333333 902.08 716.8c3.30666667 3.30666667 3.30666667 8.74666667 0 12.05333333l-45.22666667 45.12c-3.30666667 3.30666667-8.74666667 3.30666667-12.05333333 0L702.18666667 631.57333333l-46.61333334 46.61333334c-5.01333333 5.01333333-13.65333333 2.02666667-14.50666666-5.01333334L620.90666667 502.4c-0.64-5.54666667 3.94666667-10.13333333 9.38666666-9.49333333zM759.46666667 193.70666667l46.82666666 46.82666666c5.01333333 5.01333333 2.02666667 13.65333333-5.01333333 14.50666667L630.4 275.20000000000005c-5.44 0.64-10.13333333-3.94666667-9.49333333-9.49333333L641.06666667 94.82666667000001c0.85333333-7.04 9.49333333-10.02666667 14.50666666-5.01333334l46.61333334 46.61333334L844.8-6.080000000000041c3.30666667-3.30666667 8.74666667-3.30666667 12.05333333 0l45.22666667 45.12c3.30666667 3.30666667 3.30666667 8.74666667 0 12.05333333L759.46666667 193.70666667z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="daoru" unicode="" d="M917.00000001 76.5L917 696.7C917.00000001 755.3 869.3 803 810.7 803l-356 0c-17.6 0-31.9-14.3-31.9-31.9s14.3-31.9 31.9-31.9l356 0c23.4 0 42.5-19.1 42.5-42.5l1e-8-620.2c0-23.4-19.1-42.5-42.5-42.5l-584.50000001 0c-23.4 0-42.5 19.1-42.5 42.5l0 413c0 17.6-14.3 31.9-31.9 31.9s-31.9-14.3-31.9-31.9l0-413c0-58.6 47.7-106.3 106.3-106.3L810.70000001-29.799999999999955c58.6 0 106.3 47.7 106.3 106.3zM352.1 364.79999999999995l-61.4 0c-19.3 0.1-30.00000001-22.3-17.9-37.3l185.3-229.1c9.2-11.4 26.5-11.3 35.7 0.1l205.1 228c12 15 1.39999999 38.3-17.8 38.4L619 364.9c-11.7 0-20.1 8-22.7 19.4C527 688.5 170.4 765.4 145.9 762.8c93.7-99 238.6-199.00000001 229.2-375.7-0.7-12.6-10.5-22.4-23-22.3z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="ol" unicode="" d="M349.29890773 763.63588267h542.33697494a54.23369707 54.23369707 0 0 0 0-108.4673952h-542.33697494a54.23369707 54.23369707 0 0 0 0 108.4673952z m0-325.4021856h542.33697494a54.23369707 54.23369707 0 0 0 0-108.46739414h-542.33697494a54.23369707 54.23369707 0 0 0 0 108.46739414z m0-325.40218454h542.33697494a54.23369707 54.23369707 0 0 0 0-108.4673952h-542.33697494a54.23369707 54.23369707 0 0 0 0 108.4673952zM97.1122144 760.3818602700001v25.48983786a167.03978773 167.03978773 0 0 1 24.9475008 0 35.25190293 35.25190293 0 0 1 18.43945707 10.30440214 33.08255573 33.08255573 0 0 1 7.59271786 13.55842453 31.45554453 31.45554453 0 0 1 0 7.59271787H182.801456v-189.27560427h-40.67527253V760.3818602700001z m0-420.3111552a108.4673952 108.4673952 0 0 0 37.96358827 40.6752736 279.8458784 279.8458784 0 0 1 33.6248928 26.57451093 39.59059947 39.59059947 0 0 1 11.93141333 27.65918613 30.3708704 30.3708704 0 0 1-6.50804373 20.06646827 23.86282667 23.86282667 0 0 1-19.5241312 8.13505387 23.3204896 23.3204896 0 0 1-26.03217494-12.4737504 63.45342613 63.45342613 0 0 1-4.33869546-23.3204896h-35.251904a92.7396224 92.7396224 0 0 0 8.677392 39.59059946 54.23369707 54.23369707 0 0 0 54.23369706 28.7438592 67.7921216 67.7921216 0 0 0 48.26799147-16.81244586 58.5723936 58.5723936 0 0 0 17.89712-44.471632 60.7417408 60.7417408 0 0 0-12.4737504-37.96358827 126.90685227 126.90685227 0 0 0-27.65918613-24.40516373l-15.18543467-10.8467392-19.5241312-14.64309867a42.8446208 42.8446208 0 0 1-8.677392-10.30440213h83.5198944v-33.08255574H86.80781227a90.02793813 90.02793813 0 0 0 8.67739093 37.4212512z m27.11684907-304.2510432a43.38695787 43.38695787 0 0 1 3.7963584-18.98179414 25.48983787 25.48983787 0 0 1 24.9475008-14.10076053 27.65918613 27.65918613 0 0 1 17.35478293 5.4233696 28.2015232 28.2015232 0 0 1 8.13505493 21.6934784 24.9475008 24.9475008 0 0 1-15.18543466 25.48983787 78.0965248 78.0965248 0 0 1-27.11684907 7.0503808v27.11684906a71.58848107 71.58848107 0 0 1 25.48983787 3.7963584 22.23581547 22.23581547 0 0 1 12.4737504 23.32049067 24.9475008 24.9475008 0 0 1-6.50804374 17.89712 23.3204896 23.3204896 0 0 1-17.89712 7.0503808 22.77815253 22.77815253 0 0 1-19.5241312-8.677392 35.79424 35.79424 0 0 1-5.96570666-22.77815253h-35.251904a94.90897067 94.90897067 0 0 0 4.8810336 27.116848 61.28407787 61.28407787 0 0 0 14.6430976 20.60880533 50.97967573 50.97967573 0 0 0 17.354784 10.30440213 76.4695136 76.4695136 0 0 0 24.9475008 2.71168534 66.70744747 66.70744747 0 0 0 44.47163093-14.1007616 47.18331627 47.18331627 0 0 0 16.81244693-37.96358827 42.30228373 42.30228373 0 0 0-10.3044032-28.7438592 34.16722987 34.16722987 0 0 0-13.01608746-9.76206613 27.11684907 27.11684907 0 0 0 14.64309866-8.67739094 47.18331627 47.18331627 0 0 0 14.64309867-36.33657706 61.28407787 61.28407787 0 0 0-16.81244587-42.84462187 64.53810027 64.53810027 0 0 0-49.89500266-18.43945707 60.7417408 60.7417408 0 0 0-54.23369707 26.574512 79.18119787 79.18119787 0 0 0-9.219728 36.87891414z" horiz-adv-x="1024" />
|
||||
<glyph glyph-name="ol" unicode="" d="M349.29890773 763.63588267h542.33697494a54.23369707 54.23369707 0 0 0 0-108.4673952h-542.33697494a54.23369707 54.23369707 0 0 0 0 108.4673952z m0-325.4021856h542.33697494a54.23369707 54.23369707 0 0 0 0-108.46739414h-542.33697494a54.23369707 54.23369707 0 0 0 0 108.46739414z m0-325.40218454h542.33697494a54.23369707 54.23369707 0 0 0 0-108.4673952h-542.33697494a54.23369707 54.23369707 0 0 0 0 108.4673952zM97.1122144 760.3818602700001v25.48983786a167.03978773 167.03978773 0 0 1 24.9475008 0 35.25190293 35.25190293 0 0 1 18.43945707 10.30440214 33.08255573 33.08255573 0 0 1 7.59271786 13.55842453 31.45554453 31.45554453 0 0 1 0 7.59271787H182.801456v-189.27560427h-40.67527253V760.3818602700001z m0-420.3111552a108.4673952 108.4673952 0 0 0 37.96358827 40.6752736 279.8458784 279.8458784 0 0 1 33.6248928 26.57451093 39.59059947 39.59059947 0 0 1 11.93141333 27.65918613 30.3708704 30.3708704 0 0 1-6.50804373 20.06646827 23.86282667 23.86282667 0 0 1-19.5241312 8.13505387 23.3204896 23.3204896 0 0 1-26.03217494-12.4737504 63.45342613 63.45342613 0 0 1-4.33869546-23.3204896h-35.251904a92.7396224 92.7396224 0 0 0 8.677392 39.59059946 54.23369707 54.23369707 0 0 0 54.23369706 28.7438592 67.7921216 67.7921216 0 0 0 48.26799147-16.81244586 58.5723936 58.5723936 0 0 0 17.89712-44.471632 60.7417408 60.7417408 0 0 0-12.4737504-37.96358827 126.90685227 126.90685227 0 0 0-27.65918613-24.40516373l-15.18543467-10.8467392-19.5241312-14.64309867a42.8446208 42.8446208 0 0 1-8.677392-10.30440213h83.5198944v-33.08255574H86.80781227a90.02793813 90.02793813 0 0 0 8.67739093 37.4212512z m27.11684907-304.2510432a43.38695787 43.38695787 0 0 1 3.7963584-18.98179414 25.48983787 25.48983787 0 0 1 24.9475008-14.10076053 27.65918613 27.65918613 0 0 1 17.35478293 5.4233696 28.2015232 28.2015232 0 0 1 8.13505493 21.6934784 24.9475008 24.9475008 0 0 1-15.18543466 25.48983787 78.0965248 78.0965248 0 0 1-27.11684907 7.0503808v27.11684906a71.58848107 71.58848107 0 0 1 25.48983787 3.7963584 22.23581547 22.23581547 0 0 1 12.4737504 23.32049067 24.9475008 24.9475008 0 0 1-6.50804374 17.89712 23.3204896 23.3204896 0 0 1-17.89712 7.0503808 22.77815253 22.77815253 0 0 1-19.5241312-8.677392 35.79424 35.79424 0 0 1-5.96570666-22.77815253h-35.251904a94.90897067 94.90897067 0 0 0 4.8810336 27.116848 61.28407787 61.28407787 0 0 0 14.6430976 20.60880533 50.97967573 50.97967573 0 0 0 17.354784 10.30440213 76.4695136 76.4695136 0 0 0 24.9475008 2.71168534 66.70744747 66.70744747 0 0 0 44.47163093-14.1007616 47.18331627 47.18331627 0 0 0 16.81244693-37.96358827 42.30228373 42.30228373 0 0 0-10.3044032-28.7438592 34.16722987 34.16722987 0 0 0-13.01608746-9.76206613 27.11684907 27.11684907 0 0 0 14.64309866-8.67739094 47.18331627 47.18331627 0 0 0 14.64309867-36.33657706 61.28407787 61.28407787 0 0 0-16.81244587-42.84462187 64.53810027 64.53810027 0 0 0-49.89500266-18.43945707 60.7417408 60.7417408 0 0 0-54.23369707 26.574512 79.18119787 79.18119787 0 0 0-9.219728 36.87891414z" horiz-adv-x="1024" />
|
||||
|
||||
|
||||
<glyph glyph-name="save" unicode="" d="M788.69067383 752.15185547h-26.03759766v0.65917969H261.42932128v-0.65917969h-26.03759764c-50.92163086 0-92.20275879-41.19873047-92.2027588-92.12036133v-552.72216797c0-50.92163086 41.28112793-92.12036133 92.2027588-92.12036133h553.29895019c50.92163086 0 92.20275879 41.28112793 92.20275879 92.12036133V660.03149414c0 50.8392334-41.36352539 92.12036133-92.20275879 92.12036133z m-467.93518067-58.58459473H703.16210938v-118.48754882c0-21.83532715-19.03381348-39.55078125-42.51708985-39.55078125H363.272583c-23.48327637 0-42.51708984 17.71545411-42.51708983 39.55078125V693.5672607500001z m501.47094727-575.46386719c0-24.38964844-19.85778809-44.24743653-44.32983399-44.24743652H246.02099609c-24.4720459 0-44.32983398 19.77539063-44.32983398 44.24743652V649.31982422c0 24.38964844 19.85778809 44.24743653 44.32983398 44.24743653h15.32592774V568.5703125c0-50.92163086 40.78674317-92.12036133 91.1315918-92.12036133h318.96057129c50.34484864 0 91.1315918 41.28112793 91.13159179 92.12036133V693.5672607500001h15.24353027c24.4720459 0 44.32983398-19.77539063 44.32983399-44.24743653v-531.21643067zM607.58105469 568.2407226600001c16.31469727 0 29.66308594 13.34838867 29.66308593 29.66308593v32.95898438c0 16.31469727-13.34838867 29.66308594-29.66308593 29.66308594s-29.66308594-13.34838867-29.66308594-29.66308594v-32.95898438c0-16.31469727 13.34838867-29.66308594 29.66308594-29.66308593z" horiz-adv-x="1024" />
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 40 KiB |
BIN
src/assets/font/iconfont.ttf
Normal file
BIN
src/assets/font/iconfont.ttf
Normal file
Binary file not shown.
BIN
src/assets/font/iconfont.woff
Normal file
BIN
src/assets/font/iconfont.woff
Normal file
Binary file not shown.
BIN
src/assets/font/iconfont.woff2
Normal file
BIN
src/assets/font/iconfont.woff2
Normal file
Binary file not shown.
11
src/assets/js/codemirror/config.js
Normal file
11
src/assets/js/codemirror/config.js
Normal file
@ -0,0 +1,11 @@
|
||||
export default {
|
||||
tabSize: 4,
|
||||
styleActiveLine: true,
|
||||
lineNumbers: true,
|
||||
lineWrapping: false,
|
||||
line: true,
|
||||
mode: 'text/x-src',
|
||||
theme: 'default',
|
||||
cursorHeight:0.8,
|
||||
lineWiseCopyCut:true
|
||||
};
|
12470
src/assets/js/codemirror/index.js
Normal file
12470
src/assets/js/codemirror/index.js
Normal file
File diff suppressed because it is too large
Load Diff
1860
src/assets/js/codemirror/mode/css.js
vendored
Normal file
1860
src/assets/js/codemirror/mode/css.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1705
src/assets/js/codemirror/mode/javascript.js
vendored
Normal file
1705
src/assets/js/codemirror/mode/javascript.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1139
src/assets/js/codemirror/mode/markdown.js
vendored
Normal file
1139
src/assets/js/codemirror/mode/markdown.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
671
src/assets/js/codemirror/mode/meta.js
vendored
Normal file
671
src/assets/js/codemirror/mode/meta.js
vendored
Normal file
@ -0,0 +1,671 @@
|
||||
// Index, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
||||
|
||||
(function (mod) {
|
||||
if (typeof exports === 'object' && typeof module === 'object')
|
||||
{
|
||||
mod(require('../index'));
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define(['../index'], mod);
|
||||
} else {
|
||||
mod(CodeMirror);
|
||||
}
|
||||
})(function (CodeMirror) {
|
||||
CodeMirror.modeInfo = [
|
||||
{name: 'APL', mime: 'text/apl', mode: 'apl', ext: ['dyalog', 'apl']},
|
||||
{
|
||||
name: 'PGP',
|
||||
mimes: [
|
||||
'application/pgp',
|
||||
'application/pgp-encrypted',
|
||||
'application/pgp-keys',
|
||||
'application/pgp-signature'
|
||||
],
|
||||
mode: 'asciiarmor',
|
||||
ext: ['asc', 'pgp', 'sig']
|
||||
},
|
||||
{
|
||||
name: 'ASN.1',
|
||||
mime: 'text/x-ttcn-asn',
|
||||
mode: 'asn.1',
|
||||
ext: ['asn', 'asn1']
|
||||
},
|
||||
{
|
||||
name: 'Asterisk',
|
||||
mime: 'text/x-asterisk',
|
||||
mode: 'asterisk',
|
||||
file: /^extensions\.conf$/i
|
||||
},
|
||||
{
|
||||
name: 'Brainfuck',
|
||||
mime: 'text/x-brainfuck',
|
||||
mode: 'brainfuck',
|
||||
ext: ['b', 'bf']
|
||||
},
|
||||
{name: 'C', mime: 'text/x-csrc', mode: 'clike', ext: ['c', 'h', 'ino']},
|
||||
{
|
||||
name: 'C++',
|
||||
mime: 'text/x-c++src',
|
||||
mode: 'clike',
|
||||
ext: ['cpp', 'c++', 'cc', 'cxx', 'hpp', 'h++', 'hh', 'hxx'],
|
||||
alias: ['cpp']
|
||||
},
|
||||
{name: 'Cobol', mime: 'text/x-cobol', mode: 'cobol', ext: ['cob', 'cpy']},
|
||||
{
|
||||
name: 'C#',
|
||||
mime: 'text/x-csharp',
|
||||
mode: 'clike',
|
||||
ext: ['cs'],
|
||||
alias: ['csharp', 'cs']
|
||||
},
|
||||
{
|
||||
name: 'Clojure',
|
||||
mime: 'text/x-clojure',
|
||||
mode: 'clojure',
|
||||
ext: ['clj', 'cljc', 'cljx']
|
||||
},
|
||||
{
|
||||
name: 'ClojureScript',
|
||||
mime: 'text/x-clojurescript',
|
||||
mode: 'clojure',
|
||||
ext: ['cljs']
|
||||
},
|
||||
{
|
||||
name: 'Closure Stylesheets (GSS)',
|
||||
mime: 'text/x-gss',
|
||||
mode: 'css',
|
||||
ext: ['gss']
|
||||
},
|
||||
{
|
||||
name: 'CMake',
|
||||
mime: 'text/x-cmake',
|
||||
mode: 'cmake',
|
||||
ext: ['cmake', 'cmake.in'],
|
||||
file: /^CMakeLists.txt$/
|
||||
},
|
||||
{
|
||||
name: 'CoffeeScript',
|
||||
mimes: [
|
||||
'application/vnd.coffeescript',
|
||||
'text/coffeescript',
|
||||
'text/x-coffeescript'
|
||||
],
|
||||
mode: 'coffeescript',
|
||||
ext: ['coffee'],
|
||||
alias: ['coffee', 'coffee-script']
|
||||
},
|
||||
{
|
||||
name: 'Common Lisp',
|
||||
mime: 'text/x-common-lisp',
|
||||
mode: 'commonlisp',
|
||||
ext: ['cl', 'lisp', 'el'],
|
||||
alias: ['lisp']
|
||||
},
|
||||
{
|
||||
name: 'Cypher',
|
||||
mime: 'application/x-cypher-query',
|
||||
mode: 'cypher',
|
||||
ext: ['cyp', 'cypher']
|
||||
},
|
||||
{
|
||||
name: 'Cython',
|
||||
mime: 'text/x-cython',
|
||||
mode: 'python',
|
||||
ext: ['pyx', 'pxd', 'pxi']
|
||||
},
|
||||
{name: 'Crystal', mime: 'text/x-crystal', mode: 'crystal', ext: ['cr']},
|
||||
{name: 'CSS', mime: 'text/css', mode: 'css', ext: ['css']},
|
||||
{name: 'CQL', mime: 'text/x-cassandra', mode: 'sql', ext: ['cql']},
|
||||
{name: 'D', mime: 'text/x-d', mode: 'd', ext: ['d']},
|
||||
{
|
||||
name: 'Dart',
|
||||
mimes: ['application/dart', 'text/x-dart'],
|
||||
mode: 'dart',
|
||||
ext: ['dart']
|
||||
},
|
||||
{name: 'diff', mime: 'text/x-diff', mode: 'diff', ext: ['diff', 'patch']},
|
||||
{name: 'Django', mime: 'text/x-django', mode: 'django'},
|
||||
{
|
||||
name: 'Dockerfile',
|
||||
mime: 'text/x-dockerfile',
|
||||
mode: 'dockerfile',
|
||||
file: /^Dockerfile$/
|
||||
},
|
||||
{name: 'DTD', mime: 'application/xml-dtd', mode: 'dtd', ext: ['dtd']},
|
||||
{
|
||||
name: 'Dylan',
|
||||
mime: 'text/x-dylan',
|
||||
mode: 'dylan',
|
||||
ext: ['dylan', 'dyl', 'intr']
|
||||
},
|
||||
{name: 'EBNF', mime: 'text/x-ebnf', mode: 'ebnf'},
|
||||
{name: 'ECL', mime: 'text/x-ecl', mode: 'ecl', ext: ['ecl']},
|
||||
{name: 'edn', mime: 'application/edn', mode: 'clojure', ext: ['edn']},
|
||||
{name: 'Eiffel', mime: 'text/x-eiffel', mode: 'eiffel', ext: ['e']},
|
||||
{name: 'Elm', mime: 'text/x-elm', mode: 'elm', ext: ['elm']},
|
||||
{
|
||||
name: 'Embedded Javascript',
|
||||
mime: 'application/x-ejs',
|
||||
mode: 'htmlembedded',
|
||||
ext: ['ejs']
|
||||
},
|
||||
{
|
||||
name: 'Embedded Ruby',
|
||||
mime: 'application/x-erb',
|
||||
mode: 'htmlembedded',
|
||||
ext: ['erb']
|
||||
},
|
||||
{name: 'Erlang', mime: 'text/x-erlang', mode: 'erlang', ext: ['erl']},
|
||||
{name: 'Esper', mime: 'text/x-esper', mode: 'sql'},
|
||||
{name: 'Factor', mime: 'text/x-factor', mode: 'factor', ext: ['factor']},
|
||||
{name: 'FCL', mime: 'text/x-fcl', mode: 'fcl'},
|
||||
{
|
||||
name: 'Forth',
|
||||
mime: 'text/x-forth',
|
||||
mode: 'forth',
|
||||
ext: ['forth', 'fth', '4th']
|
||||
},
|
||||
{
|
||||
name: 'Fortran',
|
||||
mime: 'text/x-fortran',
|
||||
mode: 'fortran',
|
||||
ext: ['f', 'for', 'f77', 'f90', 'f95']
|
||||
},
|
||||
{
|
||||
name: 'F#',
|
||||
mime: 'text/x-fsharp',
|
||||
mode: 'mllike',
|
||||
ext: ['fs'],
|
||||
alias: ['fsharp']
|
||||
},
|
||||
{name: 'Gas', mime: 'text/x-gas', mode: 'gas', ext: ['s']},
|
||||
{
|
||||
name: 'Gherkin',
|
||||
mime: 'text/x-feature',
|
||||
mode: 'gherkin',
|
||||
ext: ['feature']
|
||||
},
|
||||
{
|
||||
name: 'GitHub Flavored Markdown',
|
||||
mime: 'text/x-gfm',
|
||||
mode: 'gfm',
|
||||
file: /^(readme|contributing|history).md$/i
|
||||
},
|
||||
{name: 'Go', mime: 'text/x-go', mode: 'go', ext: ['go']},
|
||||
{
|
||||
name: 'Groovy',
|
||||
mime: 'text/x-groovy',
|
||||
mode: 'groovy',
|
||||
ext: ['groovy', 'gradle'],
|
||||
file: /^Jenkinsfile$/
|
||||
},
|
||||
{name: 'HAML', mime: 'text/x-haml', mode: 'haml', ext: ['haml']},
|
||||
{name: 'Haskell', mime: 'text/x-haskell', mode: 'haskell', ext: ['hs']},
|
||||
{
|
||||
name: 'Haskell (Literate)',
|
||||
mime: 'text/x-literate-haskell',
|
||||
mode: 'haskell-literate',
|
||||
ext: ['lhs']
|
||||
},
|
||||
{name: 'Haxe', mime: 'text/x-haxe', mode: 'haxe', ext: ['hx']},
|
||||
{name: 'HXML', mime: 'text/x-hxml', mode: 'haxe', ext: ['hxml']},
|
||||
{
|
||||
name: 'ASP.NET',
|
||||
mime: 'application/x-aspx',
|
||||
mode: 'htmlembedded',
|
||||
ext: ['aspx'],
|
||||
alias: ['asp', 'aspx']
|
||||
},
|
||||
{
|
||||
name: 'HTML',
|
||||
mime: 'text/html',
|
||||
mode: 'htmlmixed',
|
||||
ext: ['html', 'htm', 'handlebars', 'hbs'],
|
||||
alias: ['xhtml']
|
||||
},
|
||||
{name: 'HTTP', mime: 'message/http', mode: 'http'},
|
||||
{name: 'IDL', mime: 'text/x-idl', mode: 'idl', ext: ['pro']},
|
||||
{
|
||||
name: 'Pug',
|
||||
mime: 'text/x-pug',
|
||||
mode: 'pug',
|
||||
ext: ['jade', 'pug'],
|
||||
alias: ['jade']
|
||||
},
|
||||
{name: 'Java', mime: 'text/x-java', mode: 'clike', ext: ['java']},
|
||||
{
|
||||
name: 'Java Server Pages',
|
||||
mime: 'application/x-jsp',
|
||||
mode: 'htmlembedded',
|
||||
ext: ['jsp'],
|
||||
alias: ['jsp']
|
||||
},
|
||||
{
|
||||
name: 'JavaScript',
|
||||
mimes: [
|
||||
'text/javascript',
|
||||
'text/ecmascript',
|
||||
'application/javascript',
|
||||
'application/x-javascript',
|
||||
'application/ecmascript'
|
||||
],
|
||||
mode: 'javascript',
|
||||
ext: ['js'],
|
||||
alias: ['ecmascript', 'js', 'node']
|
||||
},
|
||||
{
|
||||
name: 'JSON',
|
||||
mimes: ['application/json', 'application/x-json'],
|
||||
mode: 'javascript',
|
||||
ext: ['json', 'map'],
|
||||
alias: ['json5']
|
||||
},
|
||||
{
|
||||
name: 'JSON-LD',
|
||||
mime: 'application/ld+json',
|
||||
mode: 'javascript',
|
||||
ext: ['jsonld'],
|
||||
alias: ['jsonld']
|
||||
},
|
||||
{name: 'JSX', mime: 'text/jsx', mode: 'jsx', ext: ['jsx']},
|
||||
{
|
||||
name: 'Jinja2',
|
||||
mime: 'text/jinja2',
|
||||
mode: 'jinja2',
|
||||
ext: ['j2', 'jinja', 'jinja2']
|
||||
},
|
||||
{name: 'Julia', mime: 'text/x-julia', mode: 'julia', ext: ['jl']},
|
||||
{name: 'Kotlin', mime: 'text/x-kotlin', mode: 'clike', ext: ['kt']},
|
||||
{name: 'LESS', mime: 'text/x-less', mode: 'css', ext: ['less']},
|
||||
{
|
||||
name: 'LiveScript',
|
||||
mime: 'text/x-livescript',
|
||||
mode: 'livescript',
|
||||
ext: ['ls'],
|
||||
alias: ['ls']
|
||||
},
|
||||
{name: 'Lua', mime: 'text/x-lua', mode: 'lua', ext: ['lua']},
|
||||
{
|
||||
name: 'Markdown',
|
||||
mime: 'text/x-src',
|
||||
mode: 'markdown',
|
||||
ext: ['markdown', 'md', 'mkd']
|
||||
},
|
||||
{name: 'mIRC', mime: 'text/mirc', mode: 'mirc'},
|
||||
{name: 'MariaDB SQL', mime: 'text/x-mariadb', mode: 'sql'},
|
||||
{
|
||||
name: 'Mathematica',
|
||||
mime: 'text/x-mathematica',
|
||||
mode: 'mathematica',
|
||||
ext: ['m', 'nb', 'wl', 'wls']
|
||||
},
|
||||
{
|
||||
name: 'Modelica',
|
||||
mime: 'text/x-modelica',
|
||||
mode: 'modelica',
|
||||
ext: ['mo']
|
||||
},
|
||||
{name: 'MUMPS', mime: 'text/x-mumps', mode: 'mumps', ext: ['mps']},
|
||||
{name: 'MS SQL', mime: 'text/x-mssql', mode: 'sql'},
|
||||
{name: 'mbox', mime: 'application/mbox', mode: 'mbox', ext: ['mbox']},
|
||||
{name: 'MySQL', mime: 'text/x-mysql', mode: 'sql'},
|
||||
{
|
||||
name: 'Nginx',
|
||||
mime: 'text/x-nginx-conf',
|
||||
mode: 'nginx',
|
||||
file: /nginx.*\.conf$/i
|
||||
},
|
||||
{name: 'NSIS', mime: 'text/x-nsis', mode: 'nsis', ext: ['nsh', 'nsi']},
|
||||
{
|
||||
name: 'NTriples',
|
||||
mimes: ['application/n-triples', 'application/n-quads', 'text/n-triples'],
|
||||
mode: 'ntriples',
|
||||
ext: ['nt', 'nq']
|
||||
},
|
||||
{
|
||||
name: 'Objective-C',
|
||||
mime: 'text/x-objectivec',
|
||||
mode: 'clike',
|
||||
ext: ['m'],
|
||||
alias: ['objective-c', 'objc']
|
||||
},
|
||||
{
|
||||
name: 'Objective-C++',
|
||||
mime: 'text/x-objectivec++',
|
||||
mode: 'clike',
|
||||
ext: ['mm'],
|
||||
alias: ['objective-c++', 'objc++']
|
||||
},
|
||||
{
|
||||
name: 'OCaml',
|
||||
mime: 'text/x-ocaml',
|
||||
mode: 'mllike',
|
||||
ext: ['ml', 'mli', 'mll', 'mly']
|
||||
},
|
||||
{name: 'Octave', mime: 'text/x-octave', mode: 'octave', ext: ['m']},
|
||||
{name: 'Oz', mime: 'text/x-oz', mode: 'oz', ext: ['oz']},
|
||||
{
|
||||
name: 'Pascal',
|
||||
mime: 'text/x-pascal',
|
||||
mode: 'pascal',
|
||||
ext: ['p', 'pas']
|
||||
},
|
||||
{name: 'PEG.js', mime: 'null', mode: 'pegjs', ext: ['jsonld']},
|
||||
{name: 'Perl', mime: 'text/x-perl', mode: 'perl', ext: ['pl', 'pm']},
|
||||
{
|
||||
name: 'PHP',
|
||||
mimes: [
|
||||
'text/x-php',
|
||||
'application/x-httpd-php',
|
||||
'application/x-httpd-php-open'
|
||||
],
|
||||
mode: 'php',
|
||||
ext: ['php', 'php3', 'php4', 'php5', 'php7', 'phtml']
|
||||
},
|
||||
{name: 'Pig', mime: 'text/x-pig', mode: 'pig', ext: ['pig']},
|
||||
{
|
||||
name: 'Plain Text',
|
||||
mime: 'text/plain',
|
||||
mode: 'null',
|
||||
ext: ['txt', 'text', 'conf', 'def', 'list', 'log']
|
||||
},
|
||||
{name: 'PLSQL', mime: 'text/x-plsql', mode: 'sql', ext: ['pls']},
|
||||
{name: 'PostgreSQL', mime: 'text/x-pgsql', mode: 'sql'},
|
||||
{
|
||||
name: 'PowerShell',
|
||||
mime: 'application/x-powershell',
|
||||
mode: 'powershell',
|
||||
ext: ['ps1', 'psd1', 'psm1']
|
||||
},
|
||||
{
|
||||
name: 'Properties files',
|
||||
mime: 'text/x-properties',
|
||||
mode: 'properties',
|
||||
ext: ['properties', 'ini', 'in'],
|
||||
alias: ['ini', 'properties']
|
||||
},
|
||||
{
|
||||
name: 'ProtoBuf',
|
||||
mime: 'text/x-protobuf',
|
||||
mode: 'protobuf',
|
||||
ext: ['proto']
|
||||
},
|
||||
{
|
||||
name: 'Python',
|
||||
mime: 'text/x-python',
|
||||
mode: 'python',
|
||||
ext: ['BUILD', 'bzl', 'py', 'pyw'],
|
||||
file: /^(BUCK|BUILD)$/
|
||||
},
|
||||
{name: 'Puppet', mime: 'text/x-puppet', mode: 'puppet', ext: ['pp']},
|
||||
{name: 'Q', mime: 'text/x-q', mode: 'q', ext: ['q']},
|
||||
{
|
||||
name: 'R',
|
||||
mime: 'text/x-rsrc',
|
||||
mode: 'r',
|
||||
ext: ['r', 'R'],
|
||||
alias: ['rscript']
|
||||
},
|
||||
{
|
||||
name: 'reStructuredText',
|
||||
mime: 'text/x-rst',
|
||||
mode: 'rst',
|
||||
ext: ['rst'],
|
||||
alias: ['rst']
|
||||
},
|
||||
{name: 'RPM Changes', mime: 'text/x-rpm-changes', mode: 'rpm'},
|
||||
{name: 'RPM Spec', mime: 'text/x-rpm-spec', mode: 'rpm', ext: ['spec']},
|
||||
{
|
||||
name: 'Ruby',
|
||||
mime: 'text/x-ruby',
|
||||
mode: 'ruby',
|
||||
ext: ['rb'],
|
||||
alias: ['jruby', 'macruby', 'rake', 'rb', 'rbx']
|
||||
},
|
||||
{name: 'Rust', mime: 'text/x-rustsrc', mode: 'rust', ext: ['rs']},
|
||||
{name: 'SAS', mime: 'text/x-sas', mode: 'sas', ext: ['sas']},
|
||||
{name: 'Sass', mime: 'text/x-sass', mode: 'sass', ext: ['sass']},
|
||||
{name: 'Scala', mime: 'text/x-scala', mode: 'clike', ext: ['scala']},
|
||||
{
|
||||
name: 'Scheme',
|
||||
mime: 'text/x-scheme',
|
||||
mode: 'scheme',
|
||||
ext: ['scm', 'ss']
|
||||
},
|
||||
{name: 'SCSS', mime: 'text/x-scss', mode: 'css', ext: ['scss']},
|
||||
{
|
||||
name: 'Shell',
|
||||
mimes: ['text/x-sh', 'application/x-sh'],
|
||||
mode: 'shell',
|
||||
ext: ['sh', 'ksh', 'bash'],
|
||||
alias: ['bash', 'sh', 'zsh'],
|
||||
file: /^PKGBUILD$/
|
||||
},
|
||||
{
|
||||
name: 'Sieve',
|
||||
mime: 'application/sieve',
|
||||
mode: 'sieve',
|
||||
ext: ['siv', 'sieve']
|
||||
},
|
||||
{
|
||||
name: 'Slim',
|
||||
mimes: ['text/x-slim', 'application/x-slim'],
|
||||
mode: 'slim',
|
||||
ext: ['slim']
|
||||
},
|
||||
{name: 'Smalltalk', mime: 'text/x-stsrc', mode: 'smalltalk', ext: ['st']},
|
||||
{name: 'Smarty', mime: 'text/x-smarty', mode: 'smarty', ext: ['tpl']},
|
||||
{name: 'Solr', mime: 'text/x-solr', mode: 'solr'},
|
||||
{
|
||||
name: 'SML',
|
||||
mime: 'text/x-sml',
|
||||
mode: 'mllike',
|
||||
ext: ['sml', 'sig', 'fun', 'smackspec']
|
||||
},
|
||||
{
|
||||
name: 'Soy',
|
||||
mime: 'text/x-soy',
|
||||
mode: 'soy',
|
||||
ext: ['soy'],
|
||||
alias: ['closure template']
|
||||
},
|
||||
{
|
||||
name: 'SPARQL',
|
||||
mime: 'application/sparql-query',
|
||||
mode: 'sparql',
|
||||
ext: ['rq', 'sparql'],
|
||||
alias: ['sparul']
|
||||
},
|
||||
{
|
||||
name: 'Spreadsheet',
|
||||
mime: 'text/x-spreadsheet',
|
||||
mode: 'spreadsheet',
|
||||
alias: ['excel', 'formula']
|
||||
},
|
||||
{name: 'SQL', mime: 'text/x-sql', mode: 'sql', ext: ['sql']},
|
||||
{name: 'SQLite', mime: 'text/x-sqlite', mode: 'sql'},
|
||||
{name: 'Squirrel', mime: 'text/x-squirrel', mode: 'clike', ext: ['nut']},
|
||||
{name: 'Stylus', mime: 'text/x-styl', mode: 'stylus', ext: ['styl']},
|
||||
{name: 'Swift', mime: 'text/x-swift', mode: 'swift', ext: ['swift']},
|
||||
{name: 'sTeX', mime: 'text/x-stex', mode: 'stex'},
|
||||
{
|
||||
name: 'LaTeX',
|
||||
mime: 'text/x-latex',
|
||||
mode: 'stex',
|
||||
ext: ['text', 'ltx', 'tex'],
|
||||
alias: ['tex']
|
||||
},
|
||||
{
|
||||
name: 'SystemVerilog',
|
||||
mime: 'text/x-systemverilog',
|
||||
mode: 'verilog',
|
||||
ext: ['v', 'sv', 'svh']
|
||||
},
|
||||
{name: 'Tcl', mime: 'text/x-tcl', mode: 'tcl', ext: ['tcl']},
|
||||
{
|
||||
name: 'Textile',
|
||||
mime: 'text/x-textile',
|
||||
mode: 'textile',
|
||||
ext: ['textile']
|
||||
},
|
||||
{name: 'TiddlyWiki ', mime: 'text/x-tiddlywiki', mode: 'tiddlywiki'},
|
||||
{name: 'Tiki wiki', mime: 'text/tiki', mode: 'tiki'},
|
||||
{name: 'TOML', mime: 'text/x-toml', mode: 'toml', ext: ['toml']},
|
||||
{name: 'Tornado', mime: 'text/x-tornado', mode: 'tornado'},
|
||||
{
|
||||
name: 'troff',
|
||||
mime: 'text/troff',
|
||||
mode: 'troff',
|
||||
ext: ['1', '2', '3', '4', '5', '6', '7', '8', '9']
|
||||
},
|
||||
{
|
||||
name: 'TTCN',
|
||||
mime: 'text/x-ttcn',
|
||||
mode: 'ttcn',
|
||||
ext: ['ttcn', 'ttcn3', 'ttcnpp']
|
||||
},
|
||||
{
|
||||
name: 'TTCN_CFG',
|
||||
mime: 'text/x-ttcn-cfg',
|
||||
mode: 'ttcn-cfg',
|
||||
ext: ['cfg']
|
||||
},
|
||||
{name: 'Turtle', mime: 'text/turtle', mode: 'turtle', ext: ['ttl']},
|
||||
{
|
||||
name: 'TypeScript',
|
||||
mime: 'application/typescript',
|
||||
mode: 'javascript',
|
||||
ext: ['ts'],
|
||||
alias: ['ts']
|
||||
},
|
||||
{
|
||||
name: 'TypeScript-JSX',
|
||||
mime: 'text/typescript-jsx',
|
||||
mode: 'jsx',
|
||||
ext: ['tsx'],
|
||||
alias: ['tsx']
|
||||
},
|
||||
{name: 'Twig', mime: 'text/x-twig', mode: 'twig'},
|
||||
{name: 'Web IDL', mime: 'text/x-webidl', mode: 'webidl', ext: ['webidl']},
|
||||
{name: 'VB.NET', mime: 'text/x-vb', mode: 'vb', ext: ['vb']},
|
||||
{name: 'VBScript', mime: 'text/vbscript', mode: 'vbscript', ext: ['vbs']},
|
||||
{name: 'Velocity', mime: 'text/velocity', mode: 'velocity', ext: ['vtl']},
|
||||
{name: 'Verilog', mime: 'text/x-verilog', mode: 'verilog', ext: ['v']},
|
||||
{name: 'VHDL', mime: 'text/x-vhdl', mode: 'vhdl', ext: ['vhd', 'vhdl']},
|
||||
{
|
||||
name: 'Vue.js Component',
|
||||
mimes: ['script/x-vue', 'text/x-vue'],
|
||||
mode: 'vue',
|
||||
ext: ['vue']
|
||||
},
|
||||
{
|
||||
name: 'XML',
|
||||
mimes: ['application/xml', 'text/xml'],
|
||||
mode: 'xml',
|
||||
ext: ['xml', 'xsl', 'xsd', 'svg'],
|
||||
alias: ['rss', 'wsdl', 'xsd']
|
||||
},
|
||||
{
|
||||
name: 'XQuery',
|
||||
mime: 'application/xquery',
|
||||
mode: 'xquery',
|
||||
ext: ['xy', 'xquery']
|
||||
},
|
||||
{name: 'Yacas', mime: 'text/x-yacas', mode: 'yacas', ext: ['ys']},
|
||||
{
|
||||
name: 'YAML',
|
||||
mimes: ['text/x-yaml', 'text/yaml'],
|
||||
mode: 'yaml',
|
||||
ext: ['yaml', 'yml'],
|
||||
alias: ['yml']
|
||||
},
|
||||
{name: 'Z80', mime: 'text/x-z80', mode: 'z80', ext: ['z80']},
|
||||
{
|
||||
name: 'mscgen',
|
||||
mime: 'text/x-mscgen',
|
||||
mode: 'mscgen',
|
||||
ext: ['mscgen', 'mscin', 'msc']
|
||||
},
|
||||
{name: 'xu', mime: 'text/x-xu', mode: 'mscgen', ext: ['xu']},
|
||||
{
|
||||
name: 'msgenny',
|
||||
mime: 'text/x-msgenny',
|
||||
mode: 'mscgen',
|
||||
ext: ['msgenny']
|
||||
}
|
||||
];
|
||||
// Ensure all modes have a mime property for backwards compatibility
|
||||
for (var i = 0; i < CodeMirror.modeInfo.length; i++) {
|
||||
var info = CodeMirror.modeInfo[i];
|
||||
if (info.mimes) {
|
||||
info.mime = info.mimes[0];
|
||||
}
|
||||
}
|
||||
|
||||
CodeMirror.findModeByMIME = function (mime) {
|
||||
mime = mime.toLowerCase();
|
||||
for (var i = 0; i < CodeMirror.modeInfo.length; i++) {
|
||||
var info = CodeMirror.modeInfo[i];
|
||||
if (info.mime == mime) {
|
||||
return info;
|
||||
}
|
||||
if (info.mimes) {
|
||||
for (var j = 0; j < info.mimes.length; j++) {
|
||||
if (info.mimes[j] == mime) {
|
||||
return info;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (/\+xml$/.test(mime)) {
|
||||
return CodeMirror.findModeByMIME('application/xml');
|
||||
}
|
||||
if (/\+json$/.test(mime)) {
|
||||
return CodeMirror.findModeByMIME('application/json');
|
||||
}
|
||||
};
|
||||
|
||||
CodeMirror.findModeByExtension = function (ext) {
|
||||
for (var i = 0; i < CodeMirror.modeInfo.length; i++) {
|
||||
var info = CodeMirror.modeInfo[i];
|
||||
if (info.ext) {
|
||||
for (var j = 0; j < info.ext.length; j++) {
|
||||
if (info.ext[j] == ext) {
|
||||
return info;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
CodeMirror.findModeByFileName = function (filename) {
|
||||
for (var i = 0; i < CodeMirror.modeInfo.length; i++) {
|
||||
var info = CodeMirror.modeInfo[i];
|
||||
if (info.file && info.file.test(filename)) {
|
||||
return info;
|
||||
}
|
||||
}
|
||||
var dot = filename.lastIndexOf('.');
|
||||
var ext = dot > -1 && filename.substring(dot + 1, filename.length);
|
||||
if (ext) {
|
||||
return CodeMirror.findModeByExtension(ext);
|
||||
}
|
||||
};
|
||||
|
||||
CodeMirror.findModeByName = function (name) {
|
||||
name = name.toLowerCase();
|
||||
for (var i = 0; i < CodeMirror.modeInfo.length; i++) {
|
||||
var info = CodeMirror.modeInfo[i];
|
||||
if (info.name.toLowerCase() == name) {
|
||||
return info;
|
||||
}
|
||||
if (info.alias) {
|
||||
for (var j = 0; j < info.alias.length; j++) {
|
||||
if (info.alias[j].toLowerCase() == name) {
|
||||
return info;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
541
src/assets/js/codemirror/mode/xml.js
vendored
Normal file
541
src/assets/js/codemirror/mode/xml.js
vendored
Normal file
@ -0,0 +1,541 @@
|
||||
import CodeMirror from '../index';
|
||||
|
||||
var htmlConfig = {
|
||||
autoSelfClosers: {
|
||||
area: true,
|
||||
base: true,
|
||||
br: true,
|
||||
col: true,
|
||||
command: true,
|
||||
embed: true,
|
||||
frame: true,
|
||||
hr: true,
|
||||
img: true,
|
||||
input: true,
|
||||
keygen: true,
|
||||
link: true,
|
||||
meta: true,
|
||||
param: true,
|
||||
source: true,
|
||||
track: true,
|
||||
wbr: true,
|
||||
menuitem: true
|
||||
},
|
||||
implicitlyClosed: {
|
||||
dd: true,
|
||||
li: true,
|
||||
optgroup: true,
|
||||
option: true,
|
||||
p: true,
|
||||
rp: true,
|
||||
rt: true,
|
||||
tbody: true,
|
||||
td: true,
|
||||
tfoot: true,
|
||||
th: true,
|
||||
tr: true
|
||||
},
|
||||
contextGrabbers: {
|
||||
dd: {dd: true, dt: true},
|
||||
dt: {dd: true, dt: true},
|
||||
li: {li: true},
|
||||
option: {option: true, optgroup: true},
|
||||
optgroup: {optgroup: true},
|
||||
p: {
|
||||
address: true,
|
||||
article: true,
|
||||
aside: true,
|
||||
blockquote: true,
|
||||
dir: true,
|
||||
div: true,
|
||||
dl: true,
|
||||
fieldset: true,
|
||||
footer: true,
|
||||
form: true,
|
||||
h1: true,
|
||||
h2: true,
|
||||
h3: true,
|
||||
h4: true,
|
||||
h5: true,
|
||||
h6: true,
|
||||
header: true,
|
||||
hgroup: true,
|
||||
hr: true,
|
||||
menu: true,
|
||||
nav: true,
|
||||
ol: true,
|
||||
p: true,
|
||||
pre: true,
|
||||
section: true,
|
||||
table: true,
|
||||
ul: true
|
||||
},
|
||||
rp: {rp: true, rt: true},
|
||||
rt: {rp: true, rt: true},
|
||||
tbody: {tbody: true, tfoot: true},
|
||||
td: {td: true, th: true},
|
||||
tfoot: {tbody: true},
|
||||
th: {td: true, th: true},
|
||||
thead: {tbody: true, tfoot: true},
|
||||
tr: {tr: true}
|
||||
},
|
||||
doNotIndent: {pre: true},
|
||||
allowUnquoted: true,
|
||||
allowMissing: true,
|
||||
caseFold: true
|
||||
};
|
||||
|
||||
var xmlConfig = {
|
||||
autoSelfClosers: {},
|
||||
implicitlyClosed: {},
|
||||
contextGrabbers: {},
|
||||
doNotIndent: {},
|
||||
allowUnquoted: false,
|
||||
allowMissing: false,
|
||||
allowMissingTagName: false,
|
||||
caseFold: false
|
||||
};
|
||||
|
||||
CodeMirror.defineMode('xml', defineMode);
|
||||
|
||||
function defineMode(editorConf, config_) {
|
||||
var indentUnit = editorConf.indentUnit;
|
||||
var config = {};
|
||||
var defaults = config_.htmlMode ? htmlConfig : xmlConfig;
|
||||
for (var prop in defaults) {
|
||||
config[prop] = defaults[prop];
|
||||
}
|
||||
for (var prop in config_) {
|
||||
config[prop] = config_[prop];
|
||||
}
|
||||
|
||||
// Return variables for tokenizers
|
||||
var type, setStyle;
|
||||
|
||||
function inText(stream, state) {
|
||||
function chain(parser) {
|
||||
state.tokenize = parser;
|
||||
return parser(stream, state);
|
||||
}
|
||||
|
||||
var ch = stream.next();
|
||||
if (ch == '<') {
|
||||
if (stream.eat('!')) {
|
||||
if (stream.eat('[')) {
|
||||
if (stream.match('CDATA[')) {
|
||||
return chain(inBlock('atom', ']]>'));
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
} else if (stream.match('--')) {
|
||||
return chain(inBlock('comment', '-->'));
|
||||
} else if (stream.match('DOCTYPE', true, true)) {
|
||||
stream.eatWhile(/[\w\._\-]/);
|
||||
return chain(doctype(1));
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
} else if (stream.eat('?')) {
|
||||
stream.eatWhile(/[\w\._\-]/);
|
||||
state.tokenize = inBlock('meta', '?>');
|
||||
return 'meta';
|
||||
} else {
|
||||
type = stream.eat('/') ? 'closeTag' : 'openTag';
|
||||
state.tokenize = inTag;
|
||||
return 'tag bracket';
|
||||
}
|
||||
} else if (ch == '&') {
|
||||
var ok;
|
||||
if (stream.eat('#')) {
|
||||
if (stream.eat('x')) {
|
||||
ok = stream.eatWhile(/[a-fA-F\d]/) && stream.eat(';');
|
||||
} else {
|
||||
ok = stream.eatWhile(/[\d]/) && stream.eat(';');
|
||||
}
|
||||
} else {
|
||||
ok = stream.eatWhile(/[\w\.\-:]/) && stream.eat(';');
|
||||
}
|
||||
return ok ? 'atom' : 'error';
|
||||
} else {
|
||||
stream.eatWhile(/[^&<]/);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
inText.isInText = true;
|
||||
|
||||
function inTag(stream, state) {
|
||||
var ch = stream.next();
|
||||
if (ch == '>' || (ch == '/' && stream.eat('>'))) {
|
||||
state.tokenize = inText;
|
||||
type = ch == '>' ? 'endTag' : 'selfcloseTag';
|
||||
return 'tag bracket';
|
||||
} else if (ch == '=') {
|
||||
type = 'equals';
|
||||
return null;
|
||||
} else if (ch == '<') {
|
||||
state.tokenize = inText;
|
||||
state.state = baseState;
|
||||
state.tagName = state.tagStart = null;
|
||||
var next = state.tokenize(stream, state);
|
||||
return next ? next + ' tag error' : 'tag error';
|
||||
} else if (/[\'\"]/.test(ch)) {
|
||||
state.tokenize = inAttribute(ch);
|
||||
state.stringStartCol = stream.column();
|
||||
return state.tokenize(stream, state);
|
||||
} else {
|
||||
stream.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/);
|
||||
return 'word';
|
||||
}
|
||||
}
|
||||
|
||||
function inAttribute(quote) {
|
||||
var closure = function (stream, state) {
|
||||
while (!stream.eol()) {
|
||||
if (stream.next() == quote) {
|
||||
state.tokenize = inTag;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return 'string';
|
||||
};
|
||||
closure.isInAttribute = true;
|
||||
return closure;
|
||||
}
|
||||
|
||||
function inBlock(style, terminator) {
|
||||
return function (stream, state) {
|
||||
while (!stream.eol()) {
|
||||
if (stream.match(terminator)) {
|
||||
state.tokenize = inText;
|
||||
break;
|
||||
}
|
||||
stream.next();
|
||||
}
|
||||
return style;
|
||||
};
|
||||
}
|
||||
|
||||
function doctype(depth) {
|
||||
return function (stream, state) {
|
||||
var ch;
|
||||
while ((ch = stream.next()) != null) {
|
||||
if (ch == '<') {
|
||||
state.tokenize = doctype(depth + 1);
|
||||
return state.tokenize(stream, state);
|
||||
} else if (ch == '>') {
|
||||
if (depth == 1) {
|
||||
state.tokenize = inText;
|
||||
break;
|
||||
} else {
|
||||
state.tokenize = doctype(depth - 1);
|
||||
return state.tokenize(stream, state);
|
||||
}
|
||||
}
|
||||
}
|
||||
return 'meta';
|
||||
};
|
||||
}
|
||||
|
||||
function Context(state, tagName, startOfLine) {
|
||||
this.prev = state.context;
|
||||
this.tagName = tagName;
|
||||
this.indent = state.indented;
|
||||
this.startOfLine = startOfLine;
|
||||
if (
|
||||
config.doNotIndent.hasOwnProperty(tagName) ||
|
||||
(state.context && state.context.noIndent)
|
||||
) {
|
||||
this.noIndent = true;
|
||||
}
|
||||
}
|
||||
|
||||
function popContext(state) {
|
||||
if (state.context) {
|
||||
state.context = state.context.prev;
|
||||
}
|
||||
}
|
||||
|
||||
function maybePopContext(state, nextTagName) {
|
||||
var parentTagName;
|
||||
while (true) {
|
||||
if (!state.context) {
|
||||
return;
|
||||
}
|
||||
parentTagName = state.context.tagName;
|
||||
if (
|
||||
!config.contextGrabbers.hasOwnProperty(parentTagName) ||
|
||||
!config.contextGrabbers[parentTagName].hasOwnProperty(nextTagName)
|
||||
) {
|
||||
return;
|
||||
}
|
||||
popContext(state);
|
||||
}
|
||||
}
|
||||
|
||||
function baseState(type, stream, state) {
|
||||
if (type == 'openTag') {
|
||||
state.tagStart = stream.column();
|
||||
return tagNameState;
|
||||
} else if (type == 'closeTag') {
|
||||
return closeTagNameState;
|
||||
} else {
|
||||
return baseState;
|
||||
}
|
||||
}
|
||||
|
||||
function tagNameState(type, stream, state) {
|
||||
if (type == 'word') {
|
||||
state.tagName = stream.current();
|
||||
setStyle = 'tag';
|
||||
return attrState;
|
||||
} else if (config.allowMissingTagName && type == 'endTag') {
|
||||
setStyle = 'tag bracket';
|
||||
return attrState(type, stream, state);
|
||||
} else {
|
||||
setStyle = 'error';
|
||||
return tagNameState;
|
||||
}
|
||||
}
|
||||
|
||||
function closeTagNameState(type, stream, state) {
|
||||
if (type == 'word') {
|
||||
var tagName = stream.current();
|
||||
if (
|
||||
state.context &&
|
||||
state.context.tagName != tagName &&
|
||||
config.implicitlyClosed.hasOwnProperty(state.context.tagName)
|
||||
) {
|
||||
popContext(state);
|
||||
}
|
||||
if (
|
||||
(state.context && state.context.tagName == tagName) ||
|
||||
config.matchClosing === false
|
||||
) {
|
||||
setStyle = 'tag';
|
||||
return closeState;
|
||||
} else {
|
||||
setStyle = 'tag error';
|
||||
return closeStateErr;
|
||||
}
|
||||
} else if (config.allowMissingTagName && type == 'endTag') {
|
||||
setStyle = 'tag bracket';
|
||||
return closeState(type, stream, state);
|
||||
} else {
|
||||
setStyle = 'error';
|
||||
return closeStateErr;
|
||||
}
|
||||
}
|
||||
|
||||
function closeState(type, _stream, state) {
|
||||
if (type != 'endTag') {
|
||||
setStyle = 'error';
|
||||
return closeState;
|
||||
}
|
||||
popContext(state);
|
||||
return baseState;
|
||||
}
|
||||
|
||||
function closeStateErr(type, stream, state) {
|
||||
setStyle = 'error';
|
||||
return closeState(type, stream, state);
|
||||
}
|
||||
|
||||
function attrState(type, _stream, state) {
|
||||
if (type == 'word') {
|
||||
setStyle = 'attribute';
|
||||
return attrEqState;
|
||||
} else if (type == 'endTag' || type == 'selfcloseTag') {
|
||||
var tagName = state.tagName,
|
||||
tagStart = state.tagStart;
|
||||
state.tagName = state.tagStart = null;
|
||||
if (
|
||||
type == 'selfcloseTag' ||
|
||||
config.autoSelfClosers.hasOwnProperty(tagName)
|
||||
) {
|
||||
maybePopContext(state, tagName);
|
||||
} else {
|
||||
maybePopContext(state, tagName);
|
||||
state.context = new Context(
|
||||
state,
|
||||
tagName,
|
||||
tagStart == state.indented
|
||||
);
|
||||
}
|
||||
return baseState;
|
||||
}
|
||||
setStyle = 'error';
|
||||
return attrState;
|
||||
}
|
||||
|
||||
function attrEqState(type, stream, state) {
|
||||
if (type == 'equals') {
|
||||
return attrValueState;
|
||||
}
|
||||
if (!config.allowMissing) {
|
||||
setStyle = 'error';
|
||||
}
|
||||
return attrState(type, stream, state);
|
||||
}
|
||||
|
||||
function attrValueState(type, stream, state) {
|
||||
if (type == 'string') {
|
||||
return attrContinuedState;
|
||||
}
|
||||
if (type == 'word' && config.allowUnquoted) {
|
||||
setStyle = 'string';
|
||||
return attrState;
|
||||
}
|
||||
setStyle = 'error';
|
||||
return attrState(type, stream, state);
|
||||
}
|
||||
|
||||
function attrContinuedState(type, stream, state) {
|
||||
if (type == 'string') {
|
||||
return attrContinuedState;
|
||||
}
|
||||
return attrState(type, stream, state);
|
||||
}
|
||||
|
||||
return {
|
||||
startState: function (baseIndent) {
|
||||
var state = {
|
||||
tokenize: inText,
|
||||
state: baseState,
|
||||
indented: baseIndent || 0,
|
||||
tagName: null,
|
||||
tagStart: null,
|
||||
context: null
|
||||
};
|
||||
if (baseIndent != null) {
|
||||
state.baseIndent = baseIndent;
|
||||
}
|
||||
return state;
|
||||
},
|
||||
|
||||
token: function (stream, state) {
|
||||
if (!state.tagName && stream.sol()) {
|
||||
state.indented = stream.indentation();
|
||||
}
|
||||
|
||||
if (stream.eatSpace()) {
|
||||
return null;
|
||||
}
|
||||
type = null;
|
||||
var style = state.tokenize(stream, state);
|
||||
if ((style || type) && style != 'comment') {
|
||||
setStyle = null;
|
||||
state.state = state.state(type || style, stream, state);
|
||||
if (setStyle) {
|
||||
style = setStyle == 'error' ? style + ' error' : setStyle;
|
||||
}
|
||||
}
|
||||
return style;
|
||||
},
|
||||
|
||||
indent: function (state, textAfter, fullLine) {
|
||||
var context = state.context;
|
||||
// Indent multi-line strings (e.g. css).
|
||||
if (state.tokenize.isInAttribute) {
|
||||
if (state.tagStart == state.indented) {
|
||||
return state.stringStartCol + 1;
|
||||
} else {
|
||||
return state.indented + indentUnit;
|
||||
}
|
||||
}
|
||||
if (context && context.noIndent) {
|
||||
return CodeMirror.Pass;
|
||||
}
|
||||
if (state.tokenize != inTag && state.tokenize != inText) {
|
||||
return fullLine ? fullLine.match(/^(\s*)/)[0].length : 0;
|
||||
}
|
||||
// Indent the starts of attribute names.
|
||||
if (state.tagName) {
|
||||
if (config.multilineTagIndentPastTag !== false) {
|
||||
return state.tagStart + state.tagName.length + 2;
|
||||
} else {
|
||||
return (
|
||||
state.tagStart +
|
||||
indentUnit * (config.multilineTagIndentFactor || 1)
|
||||
);
|
||||
}
|
||||
}
|
||||
if (config.alignCDATA && /<!\[CDATA\[/.test(textAfter)) {
|
||||
return 0;
|
||||
}
|
||||
var tagAfter = textAfter && /^<(\/)?([\w_:\.-]*)/.exec(textAfter);
|
||||
if (tagAfter && tagAfter[1]) {
|
||||
// Closing tag spotted
|
||||
while (context) {
|
||||
if (context.tagName == tagAfter[2]) {
|
||||
context = context.prev;
|
||||
break;
|
||||
} else if (
|
||||
config.implicitlyClosed.hasOwnProperty(context.tagName)
|
||||
) {
|
||||
context = context.prev;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else if (tagAfter) {
|
||||
// Opening tag spotted
|
||||
while (context) {
|
||||
var grabbers = config.contextGrabbers[context.tagName];
|
||||
if (grabbers && grabbers.hasOwnProperty(tagAfter[2])) {
|
||||
context = context.prev;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
while (context && context.prev && !context.startOfLine) {
|
||||
context = context.prev;
|
||||
}
|
||||
if (context) {
|
||||
return context.indent + indentUnit;
|
||||
} else {
|
||||
return state.baseIndent || 0;
|
||||
}
|
||||
},
|
||||
|
||||
electricInput: /<\/[\s\w:]+>$/,
|
||||
blockCommentStart: '<!--',
|
||||
blockCommentEnd: '-->',
|
||||
|
||||
configuration: config.htmlMode ? 'html' : 'xml',
|
||||
helperType: config.htmlMode ? 'html' : 'xml',
|
||||
|
||||
skipAttribute: function (state) {
|
||||
if (state.state == attrValueState) {
|
||||
state.state = attrState;
|
||||
}
|
||||
},
|
||||
|
||||
xmlCurrentTag: function (state) {
|
||||
return state.tagName ?
|
||||
{name: state.tagName, close: state.type == 'closeTag'} :
|
||||
null;
|
||||
},
|
||||
|
||||
xmlCurrentContext: function (state) {
|
||||
var context = [];
|
||||
for (var cx = state.context; cx; cx = cx.prev) {
|
||||
if (cx.tagName) {
|
||||
context.push(cx.tagName);
|
||||
}
|
||||
}
|
||||
return context.reverse();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
CodeMirror.defineMIME('text/xml', 'xml');
|
||||
CodeMirror.defineMIME('php', 'xml');
|
||||
CodeMirror.defineMIME('vue', 'xml');
|
||||
CodeMirror.defineMIME('html', 'xml');
|
||||
CodeMirror.defineMIME('application/xml', 'xml');
|
||||
if (!CodeMirror.mimeModes.hasOwnProperty('text/html')) {
|
||||
CodeMirror.defineMIME('text/html', {name: 'xml', htmlMode: true});
|
||||
}
|
||||
|
581
src/assets/js/codemirror/styles/codemirror.css
Normal file
581
src/assets/js/codemirror/styles/codemirror.css
Normal file
@ -0,0 +1,581 @@
|
||||
/* BASICS */
|
||||
|
||||
.CodeMirror {
|
||||
height: 100%;
|
||||
color: black;
|
||||
direction: ltr;
|
||||
}
|
||||
|
||||
/* PADDING */
|
||||
|
||||
.CodeMirror-lines {
|
||||
padding: 4px 0;
|
||||
}
|
||||
|
||||
.CodeMirror pre.CodeMirror-line,
|
||||
.CodeMirror pre.CodeMirror-line-like {
|
||||
padding: 0 4px;
|
||||
padding-left: 8px;
|
||||
}
|
||||
|
||||
.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
|
||||
background-color: white; /* The little square between H and V scrollbars */
|
||||
}
|
||||
|
||||
/* GUTTER */
|
||||
|
||||
.CodeMirror-gutters {
|
||||
border-right: 1px solid #ddd;
|
||||
background-color: #f7f7f7;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.CodeMirror-linenumbers {
|
||||
}
|
||||
|
||||
.CodeMirror-linenumber {
|
||||
padding: 0 5px!important;
|
||||
min-width: 20px;
|
||||
text-align: right;
|
||||
color: #999;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.CodeMirror-guttermarker {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.CodeMirror-guttermarker-subtle {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
/* CURSOR */
|
||||
|
||||
.CodeMirror-cursor {
|
||||
border-left: 1px solid black;
|
||||
border-right: none;
|
||||
width: 0;
|
||||
}
|
||||
|
||||
/* Shown when moving in bi-directional text */
|
||||
.CodeMirror div.CodeMirror-secondarycursor {
|
||||
border-left: 1px solid silver;
|
||||
}
|
||||
|
||||
.cm-fat-cursor .CodeMirror-cursor {
|
||||
width: auto;
|
||||
border: 0 !important;
|
||||
background: #7e7;
|
||||
}
|
||||
|
||||
.cm-fat-cursor div.CodeMirror-cursors {
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.cm-fat-cursor-mark {
|
||||
background-color: rgba(20, 255, 20, 0.5);
|
||||
-webkit-animation: blink 1.06s steps(1) infinite;
|
||||
-moz-animation: blink 1.06s steps(1) infinite;
|
||||
animation: blink 1.06s steps(1) infinite;
|
||||
}
|
||||
|
||||
.cm-animate-fat-cursor {
|
||||
width: auto;
|
||||
border: 0;
|
||||
-webkit-animation: blink 1.06s steps(1) infinite;
|
||||
-moz-animation: blink 1.06s steps(1) infinite;
|
||||
animation: blink 1.06s steps(1) infinite;
|
||||
background-color: #7e7;
|
||||
}
|
||||
|
||||
@-moz-keyframes blink {
|
||||
0% {
|
||||
}
|
||||
50% {
|
||||
background-color: transparent;
|
||||
}
|
||||
100% {
|
||||
}
|
||||
}
|
||||
|
||||
@-webkit-keyframes blink {
|
||||
0% {
|
||||
}
|
||||
50% {
|
||||
background-color: transparent;
|
||||
}
|
||||
100% {
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
0% {
|
||||
}
|
||||
50% {
|
||||
background-color: transparent;
|
||||
}
|
||||
100% {
|
||||
}
|
||||
}
|
||||
|
||||
/* Can style cursor different in overwrite (non-insert) mode */
|
||||
.CodeMirror-overwrite .CodeMirror-cursor {
|
||||
}
|
||||
|
||||
.cm-tab {
|
||||
display: inline-block;
|
||||
text-decoration: inherit;
|
||||
}
|
||||
|
||||
.CodeMirror-rulers {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: -50px;
|
||||
bottom: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.CodeMirror-ruler {
|
||||
border-left: 1px solid #ccc;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
|
||||
/* STOP */
|
||||
|
||||
/* The rest of this file contains styles related to the mechanics of
|
||||
the src. You probably shouldn't touch them. */
|
||||
|
||||
.CodeMirror {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
background: white;
|
||||
}
|
||||
|
||||
.CodeMirror-scroll {
|
||||
overflow: scroll !important; /* Things will break if this is overridden */
|
||||
/* 30px is the magic margin used to hide the element's real scrollbars */
|
||||
/* See overflow: hidden in .Index */
|
||||
margin-bottom: -30px;
|
||||
margin-right: -30px;
|
||||
padding-bottom: 30px;
|
||||
height: 100%;
|
||||
outline: none; /* Prevent dragging from highlighting the element */
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.CodeMirror-sizer {
|
||||
position: relative;
|
||||
border-right: 30px solid transparent;
|
||||
}
|
||||
|
||||
/* The fake, visible scrollbars. Used to force redraw during scrolling
|
||||
before actual scrolling happens, thus preventing shaking and
|
||||
flickering artifacts. */
|
||||
.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
|
||||
position: absolute;
|
||||
z-index: 6;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.CodeMirror-vscrollbar {
|
||||
right: 0;
|
||||
top: 0;
|
||||
overflow-x: hidden;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.CodeMirror-hscrollbar {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
overflow-y: hidden;
|
||||
overflow-x: scroll;
|
||||
}
|
||||
|
||||
.CodeMirror-scrollbar-filler {
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.CodeMirror-gutter-filler {
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.CodeMirror-gutters {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
min-height: 100%;
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
.CodeMirror-gutter {
|
||||
white-space: normal;
|
||||
height: 100%;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
margin-bottom: -30px;
|
||||
}
|
||||
|
||||
.CodeMirror-gutter-wrapper {
|
||||
position: absolute;
|
||||
z-index: 4;
|
||||
background: none !important;
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
.CodeMirror-gutter-background {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
z-index: 4;
|
||||
}
|
||||
|
||||
.CodeMirror-gutter-elt {
|
||||
position: absolute;
|
||||
cursor: default;
|
||||
z-index: 4;
|
||||
}
|
||||
|
||||
.CodeMirror-gutter-wrapper ::selection {
|
||||
background-color: transparent
|
||||
}
|
||||
|
||||
.CodeMirror-gutter-wrapper ::-moz-selection {
|
||||
background-color: transparent
|
||||
}
|
||||
|
||||
.CodeMirror-lines {
|
||||
cursor: text;
|
||||
min-height: 1px; /* prevents collapsing before first draw */
|
||||
}
|
||||
|
||||
.CodeMirror pre.CodeMirror-line,
|
||||
.CodeMirror pre.CodeMirror-line-like {
|
||||
/* Reset some styles that the rest of the page might have set */
|
||||
-moz-border-radius: 0;
|
||||
-webkit-border-radius: 0;
|
||||
border-radius: 0;
|
||||
border-width: 0;
|
||||
background: transparent;
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
margin: 0;
|
||||
white-space: pre;
|
||||
word-wrap: normal;
|
||||
line-height: inherit;
|
||||
color: inherit;
|
||||
z-index: 2;
|
||||
position: relative;
|
||||
overflow: visible;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
-webkit-font-variant-ligatures: contextual;
|
||||
font-variant-ligatures: contextual;
|
||||
}
|
||||
|
||||
.CodeMirror-wrap pre.CodeMirror-line,
|
||||
.CodeMirror-wrap pre.CodeMirror-line-like {
|
||||
word-wrap: break-word;
|
||||
white-space: pre-wrap;
|
||||
word-break: normal;
|
||||
}
|
||||
|
||||
.CodeMirror-linebackground {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.CodeMirror-linewidget {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
padding: 0.1px; /* Force widget margins to stay inside of the container */
|
||||
}
|
||||
|
||||
.CodeMirror-widget {
|
||||
}
|
||||
|
||||
.CodeMirror-rtl pre {
|
||||
direction: rtl;
|
||||
}
|
||||
|
||||
.CodeMirror-code {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
/* Force content-box sizing for the elements where we expect it */
|
||||
.CodeMirror-scroll,
|
||||
.CodeMirror-sizer,
|
||||
.CodeMirror-gutter,
|
||||
.CodeMirror-gutters,
|
||||
.CodeMirror-linenumber {
|
||||
-moz-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
.CodeMirror-measure {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.CodeMirror-cursor {
|
||||
position: absolute;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.CodeMirror-measure pre {
|
||||
position: static;
|
||||
}
|
||||
|
||||
div.CodeMirror-cursors {
|
||||
visibility: hidden;
|
||||
position: relative;
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
div.CodeMirror-dragcursors {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.CodeMirror-focused div.CodeMirror-cursors {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.CodeMirror-selected {
|
||||
background: #d9d9d9;
|
||||
}
|
||||
|
||||
.CodeMirror-focused .CodeMirror-selected {
|
||||
background: #d7d4f0;
|
||||
}
|
||||
|
||||
.CodeMirror-crosshair {
|
||||
cursor: crosshair;
|
||||
}
|
||||
|
||||
.CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection {
|
||||
background: #d7d4f0;
|
||||
}
|
||||
|
||||
.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection {
|
||||
background: #d7d4f0;
|
||||
}
|
||||
|
||||
.cm-searching {
|
||||
background-color: #ffa;
|
||||
background-color: rgba(255, 255, 0, .4);
|
||||
}
|
||||
|
||||
/* Used to force a border model for a node */
|
||||
.cm-force-border {
|
||||
padding-right: .1px;
|
||||
}
|
||||
|
||||
@media print {
|
||||
/* Hide the cursor when printing */
|
||||
.CodeMirror div.CodeMirror-cursors {
|
||||
visibility: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
/* See issue #2901 */
|
||||
.cm-tab-wrap-hack:after {
|
||||
content: '';
|
||||
}
|
||||
|
||||
/* Help users use markselection to safely style text background */
|
||||
span.CodeMirror-selectedtext {
|
||||
background: none;
|
||||
}
|
||||
|
||||
|
||||
.cm-negative {
|
||||
color: #d44;
|
||||
}
|
||||
|
||||
.cm-positive {
|
||||
color: #292;
|
||||
}
|
||||
|
||||
.cm-header, .cm-strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.cm-em {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
|
||||
.cm-strikethrough {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
.cm-invalidchar {
|
||||
color: #f00;
|
||||
}
|
||||
|
||||
.CodeMirror-composing {
|
||||
border-bottom: 2px solid;
|
||||
}
|
||||
|
||||
/* Default styles for common addons */
|
||||
|
||||
div.CodeMirror span.CodeMirror-matchingbracket {
|
||||
color: #0b0;
|
||||
}
|
||||
|
||||
div.CodeMirror span.CodeMirror-nonmatchingbracket {
|
||||
color: #a22;
|
||||
}
|
||||
|
||||
.CodeMirror-matchingtag {
|
||||
background: rgba(255, 150, 0, .3);
|
||||
}
|
||||
|
||||
.CodeMirror-activeline-background {
|
||||
background: #e8f2ff;
|
||||
}
|
||||
|
||||
/* DEFAULT THEME */
|
||||
|
||||
.cm-s-default.CodeMirror,
|
||||
.cm-s-default .CodeMirror-gutters {
|
||||
background-color: #282a36 !important;
|
||||
color: #f8f8f2 !important;
|
||||
border: none;
|
||||
font-family: Menlo, Consolas, "Courier New", Courier, FreeMono, monospace !important;
|
||||
|
||||
}
|
||||
|
||||
.cm-s-default * {
|
||||
line-height: 1.6 !important;
|
||||
font-size: 14px;
|
||||
font-family: Menlo, Consolas, "Courier New", Courier, FreeMono, monospace !important;
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.cm-s-default .CodeMirror-gutters {
|
||||
color: #282a36;
|
||||
}
|
||||
|
||||
.cm-s-default .CodeMirror-cursor {
|
||||
border-left: solid thin #f8f8f0;
|
||||
}
|
||||
|
||||
.cm-s-default .CodeMirror-selected {
|
||||
background: rgba(255, 255, 255, 0.10);
|
||||
}
|
||||
|
||||
.cm-s-default .CodeMirror-line::selection,
|
||||
.cm-s-default .CodeMirror-line > span::selection,
|
||||
.cm-s-default .CodeMirror-line > span > span::selection {
|
||||
background: rgba(255, 255, 255, 0.10);
|
||||
}
|
||||
|
||||
.cm-s-default .CodeMirror-line::-moz-selection,
|
||||
.cm-s-default .CodeMirror-line > span::-moz-selection,
|
||||
.cm-s-default .CodeMirror-line > span > span::-moz-selection {
|
||||
background: rgba(255, 255, 255, 0.10);
|
||||
}
|
||||
|
||||
.cm-s-default span.cm-comment {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.cm-s-default span.cm-string,
|
||||
.cm-s-default span.cm-string-2 {
|
||||
color: #ce9178;
|
||||
}
|
||||
|
||||
.cm-s-default span.cm-number {
|
||||
color: #bd93f9;
|
||||
}
|
||||
|
||||
.cm-s-default span.cm-variable {
|
||||
color: #61afef;
|
||||
}
|
||||
|
||||
.cm-s-default span.cm-variable-2 {
|
||||
color: #61afef;
|
||||
}
|
||||
|
||||
.cm-s-default span.cm-def {
|
||||
color: #e0e2e4;
|
||||
}
|
||||
|
||||
.cm-s-default span.cm-operator {
|
||||
color: #e0e2e4;
|
||||
}
|
||||
|
||||
.cm-s-default span.cm-keyword {
|
||||
color: #c678dd;
|
||||
}
|
||||
|
||||
.cm-s-default span.cm-atom {
|
||||
color: #bd93f9;
|
||||
}
|
||||
|
||||
.cm-s-default span.cm-meta {
|
||||
color: #f8f8f2;
|
||||
}
|
||||
|
||||
.cm-s-default span.cm-tag {
|
||||
color: #569cd6;
|
||||
}
|
||||
|
||||
.cm-s-default span.cm-attribute {
|
||||
color: #9cdcfe;
|
||||
}
|
||||
|
||||
.cm-s-default span.cm-qualifier {
|
||||
color: #9cdcfe;
|
||||
}
|
||||
|
||||
.cm-s-default span.cm-property {
|
||||
color: #dcdcaa;
|
||||
}
|
||||
|
||||
.cm-s-default span.cm-builtin {
|
||||
color: #50fa7b;
|
||||
}
|
||||
|
||||
.cm-s-default span.cm-variable-3,
|
||||
.cm-s-default span.cm-type {
|
||||
color: #ffb86c;
|
||||
}
|
||||
|
||||
.cm-s-default .CodeMirror-activeline-background {
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
.cm-s-default .CodeMirror-matchingbracket {
|
||||
text-decoration: underline;
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
.cm-s-default .cm-header {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.cm-s-default .CodeMirror-gutter {
|
||||
background: #22252b;
|
||||
padding-right: 2px;
|
||||
}
|
||||
|
||||
.cm-link {
|
||||
text-decoration: underline;
|
||||
color: #569cd6;
|
||||
}
|
||||
.cm-url{
|
||||
color: #9cdcfe!important;
|
||||
}
|
121
src/assets/js/codemirror/styles/dark.css
Normal file
121
src/assets/js/codemirror/styles/dark.css
Normal file
@ -0,0 +1,121 @@
|
||||
|
||||
.cm-s-dark.CodeMirror,
|
||||
.cm-s-dark .CodeMirror-gutters {
|
||||
background-color: #282a36 !important;
|
||||
color: #f8f8f2 !important;
|
||||
border: none;
|
||||
font-family: Menlo, Consolas, "Courier New", Courier, FreeMono, monospace !important;
|
||||
|
||||
}
|
||||
|
||||
.cm-s-dark * {
|
||||
line-height: 1.6 !important;
|
||||
font-size: 14px;
|
||||
font-family: Menlo, Consolas, "Courier New", Courier, FreeMono, monospace !important;
|
||||
color: #ccc;
|
||||
}
|
||||
.cm-s-dark .CodeMirror-gutters {
|
||||
color: #282a36;
|
||||
}
|
||||
|
||||
.cm-s-dark .CodeMirror-cursor {
|
||||
border-left: solid thin #f8f8f0;
|
||||
}
|
||||
|
||||
.cm-s-dark .CodeMirror-selected {
|
||||
background: rgba(255, 255, 255, 0.10);
|
||||
}
|
||||
|
||||
.cm-s-dark .CodeMirror-line::selection,
|
||||
.cm-s-dark .CodeMirror-line>span::selection,
|
||||
.cm-s-dark .CodeMirror-line>span>span::selection {
|
||||
background: rgba(255, 255, 255, 0.10);
|
||||
}
|
||||
|
||||
.cm-s-dark .CodeMirror-line::-moz-selection,
|
||||
.cm-s-dark .CodeMirror-line>span::-moz-selection,
|
||||
.cm-s-dark .CodeMirror-line>span>span::-moz-selection {
|
||||
background: rgba(255, 255, 255, 0.10);
|
||||
}
|
||||
|
||||
.cm-s-dark span.cm-comment {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.cm-s-dark span.cm-string,
|
||||
.cm-s-dark span.cm-string-2 {
|
||||
color: #ce9178;
|
||||
}
|
||||
|
||||
.cm-s-dark span.cm-number {
|
||||
color: #bd93f9;
|
||||
}
|
||||
|
||||
.cm-s-dark span.cm-variable {
|
||||
color: #61afef;
|
||||
}
|
||||
|
||||
.cm-s-dark span.cm-variable-2 {
|
||||
color: #61afef;
|
||||
}
|
||||
|
||||
.cm-s-dark span.cm-def {
|
||||
color: #e0e2e4;
|
||||
}
|
||||
|
||||
.cm-s-dark span.cm-operator {
|
||||
color: #e0e2e4;
|
||||
}
|
||||
|
||||
.cm-s-dark span.cm-keyword {
|
||||
color: #c678dd;
|
||||
}
|
||||
|
||||
.cm-s-dark span.cm-atom {
|
||||
color: #bd93f9;
|
||||
}
|
||||
|
||||
.cm-s-dark span.cm-meta {
|
||||
color: #f8f8f2;
|
||||
}
|
||||
|
||||
.cm-s-dark span.cm-tag {
|
||||
color: #569cd6;
|
||||
}
|
||||
|
||||
.cm-s-dark span.cm-attribute {
|
||||
color: #9cdcfe;
|
||||
}
|
||||
|
||||
.cm-s-dark span.cm-qualifier {
|
||||
color: #9cdcfe;
|
||||
}
|
||||
|
||||
.cm-s-dark span.cm-property {
|
||||
color: #dcdcaa;
|
||||
}
|
||||
|
||||
.cm-s-dark span.cm-builtin {
|
||||
color: #50fa7b;
|
||||
}
|
||||
|
||||
.cm-s-dark span.cm-variable-3,
|
||||
.cm-s-dark span.cm-type {
|
||||
color: #ffb86c;
|
||||
}
|
||||
|
||||
.cm-s-dark .CodeMirror-activeline-background {
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
.cm-s-dark .CodeMirror-matchingbracket {
|
||||
text-decoration: underline;
|
||||
color: white !important;
|
||||
}
|
||||
.cm-s-dark .cm-header{
|
||||
color: #fff;
|
||||
}
|
||||
.cm-s-dark .CodeMirror-gutter {
|
||||
background: #22252b;
|
||||
padding-right: 2px;
|
||||
}
|
871
src/assets/js/hightlight/highlight.js
Normal file
871
src/assets/js/hightlight/highlight.js
Normal file
@ -0,0 +1,871 @@
|
||||
var hljs = {};
|
||||
// Convenience variables for build-in objects
|
||||
var ArrayProto = [],
|
||||
objectKeys = Object.keys;
|
||||
|
||||
// Global internal variables used within the highlight.js library.
|
||||
var languages = {},
|
||||
aliases = {};
|
||||
|
||||
// Regular expressions used throughout the highlight.js library.
|
||||
var noHighlightRe = /^(no-?highlight|plain|text)$/i,
|
||||
languagePrefixRe = /\blang(?:uage)?-([\w-]+)\b/i,
|
||||
fixMarkupRe = /((^(<[^>]+>|\t|)+|(?:\n)))/gm;
|
||||
|
||||
// The object will be assigned by the build tool. It used to synchronize API
|
||||
// of external language files with minified version of the highlight.js library.
|
||||
var API_REPLACES;
|
||||
|
||||
var spanEndTag = '</span>';
|
||||
|
||||
// Global options used when within external APIs. This is modified when
|
||||
// calling the `hljs.configure` function.
|
||||
var options = {
|
||||
classPrefix: 'hljs-',
|
||||
tabReplace: null,
|
||||
useBR: false,
|
||||
languages: undefined
|
||||
};
|
||||
|
||||
|
||||
/* Utility functions */
|
||||
|
||||
function escape(value) {
|
||||
return value.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
|
||||
}
|
||||
|
||||
function tag(node) {
|
||||
return node.nodeName.toLowerCase();
|
||||
}
|
||||
|
||||
function testRe(re, lexeme) {
|
||||
var match = re && re.exec(lexeme);
|
||||
return match && match.index === 0;
|
||||
}
|
||||
|
||||
function isNotHighlighted(language) {
|
||||
return noHighlightRe.test(language);
|
||||
}
|
||||
|
||||
function blockLanguage(block) {
|
||||
var i, match, length, _class;
|
||||
var classes = block.className + ' ';
|
||||
|
||||
classes += block.parentNode ? block.parentNode.className : '';
|
||||
|
||||
// language-* takes precedence over non-prefixed class names.
|
||||
match = languagePrefixRe.exec(classes);
|
||||
if (match) {
|
||||
return getLanguage(match[1]) ? match[1] : 'no-highlight';
|
||||
}
|
||||
|
||||
classes = classes.split(/\s+/);
|
||||
|
||||
for (i = 0, length = classes.length; i < length; i++) {
|
||||
_class = classes[i];
|
||||
|
||||
if (isNotHighlighted(_class) || getLanguage(_class)) {
|
||||
return _class;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function inherit(parent) { // inherit(parent, override_obj, override_obj, ...)
|
||||
var key;
|
||||
var result = {};
|
||||
var objects = Array.prototype.slice.call(arguments, 1);
|
||||
|
||||
for (key in parent)
|
||||
result[key] = parent[key];
|
||||
objects.forEach(function (obj) {
|
||||
for (key in obj)
|
||||
result[key] = obj[key];
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
/* Stream merging */
|
||||
|
||||
function nodeStream(node) {
|
||||
var result = [];
|
||||
(function _nodeStream(node, offset) {
|
||||
for (var child = node.firstChild; child; child = child.nextSibling) {
|
||||
if (child.nodeType === 3)
|
||||
offset += child.nodeValue.length;
|
||||
else if (child.nodeType === 1) {
|
||||
result.push({
|
||||
event: 'start',
|
||||
offset: offset,
|
||||
node: child
|
||||
});
|
||||
offset = _nodeStream(child, offset);
|
||||
// Prevent void elements from having an end tag that would actually
|
||||
// double them in the output. There are more void elements in HTML
|
||||
// but we list only those realistically expected in code display.
|
||||
if (!tag(child).match(/br|hr|img|input/)) {
|
||||
result.push({
|
||||
event: 'stop',
|
||||
offset: offset,
|
||||
node: child
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
return offset;
|
||||
})(node, 0);
|
||||
return result;
|
||||
}
|
||||
|
||||
function mergeStreams(original, highlighted, value) {
|
||||
var processed = 0;
|
||||
var result = '';
|
||||
var nodeStack = [];
|
||||
|
||||
function selectStream() {
|
||||
if (!original.length || !highlighted.length) {
|
||||
return original.length ? original : highlighted;
|
||||
}
|
||||
if (original[0].offset !== highlighted[0].offset) {
|
||||
return (original[0].offset < highlighted[0].offset) ? original : highlighted;
|
||||
}
|
||||
|
||||
/*
|
||||
To avoid starting the stream just before it should stop the order is
|
||||
ensured that original always starts first and closes last:
|
||||
|
||||
if (event1 == 'start' && event2 == 'start')
|
||||
return original;
|
||||
if (event1 == 'start' && event2 == 'stop')
|
||||
return highlighted;
|
||||
if (event1 == 'stop' && event2 == 'start')
|
||||
return original;
|
||||
if (event1 == 'stop' && event2 == 'stop')
|
||||
return highlighted;
|
||||
|
||||
... which is collapsed to:
|
||||
*/
|
||||
return highlighted[0].event === 'start' ? original : highlighted;
|
||||
}
|
||||
|
||||
function open(node) {
|
||||
function attr_str(a) {
|
||||
return ' ' + a.nodeName + '="' + escape(a.value).replace('"', '"') + '"';
|
||||
}
|
||||
|
||||
result += '<' + tag(node) + ArrayProto.map.call(node.attributes, attr_str).join('') + '>';
|
||||
}
|
||||
|
||||
function close(node) {
|
||||
result += '</' + tag(node) + '>';
|
||||
}
|
||||
|
||||
function render(event) {
|
||||
(event.event === 'start' ? open : close)(event.node);
|
||||
}
|
||||
|
||||
while (original.length || highlighted.length) {
|
||||
var stream = selectStream();
|
||||
result += escape(value.substring(processed, stream[0].offset));
|
||||
processed = stream[0].offset;
|
||||
if (stream === original) {
|
||||
/*
|
||||
On any opening or closing tag of the original markup we first close
|
||||
the entire highlighted node stack, then render the original tag along
|
||||
with all the following original tags at the same offset and then
|
||||
reopen all the tags on the highlighted stack.
|
||||
*/
|
||||
nodeStack.reverse().forEach(close);
|
||||
do {
|
||||
render(stream.splice(0, 1)[0]);
|
||||
stream = selectStream();
|
||||
} while (stream === original && stream.length && stream[0].offset === processed);
|
||||
nodeStack.reverse().forEach(open);
|
||||
} else {
|
||||
if (stream[0].event === 'start') {
|
||||
nodeStack.push(stream[0].node);
|
||||
} else {
|
||||
nodeStack.pop();
|
||||
}
|
||||
render(stream.splice(0, 1)[0]);
|
||||
}
|
||||
}
|
||||
return result + escape(value.substr(processed));
|
||||
}
|
||||
|
||||
/* Initialization */
|
||||
|
||||
function expand_mode(mode) {
|
||||
if (mode.variants && !mode.cached_variants) {
|
||||
mode.cached_variants = mode.variants.map(function (variant) {
|
||||
return inherit(mode, {variants: null}, variant);
|
||||
});
|
||||
}
|
||||
return mode.cached_variants || (mode.endsWithParent && [inherit(mode)]) || [mode];
|
||||
}
|
||||
|
||||
function restoreLanguageApi(obj) {
|
||||
if (API_REPLACES && !obj.langApiRestored) {
|
||||
obj.langApiRestored = true;
|
||||
for (var key in API_REPLACES)
|
||||
obj[key] && (obj[API_REPLACES[key]] = obj[key]);
|
||||
(obj.contains || []).concat(obj.variants || []).forEach(restoreLanguageApi);
|
||||
}
|
||||
}
|
||||
|
||||
function compileLanguage(language) {
|
||||
|
||||
function reStr(re) {
|
||||
return (re && re.source) || re;
|
||||
}
|
||||
|
||||
function langRe(value, global) {
|
||||
return new RegExp(
|
||||
reStr(value),
|
||||
'm' + (language.case_insensitive ? 'i' : '') + (global ? 'g' : '')
|
||||
);
|
||||
}
|
||||
|
||||
// joinRe logically computes regexps.join(separator), but fixes the
|
||||
// backreferences so they continue to match.
|
||||
function joinRe(regexps, separator) {
|
||||
// backreferenceRe matches an open parenthesis or backreference. To avoid
|
||||
// an incorrect parse, it additionally matches the following:
|
||||
// - [...] elements, where the meaning of parentheses and escapes change
|
||||
// - other escape sequences, so we do not misparse escape sequences as
|
||||
// interesting elements
|
||||
// - non-matching or lookahead parentheses, which do not capture. These
|
||||
// follow the '(' with a '?'.
|
||||
var backreferenceRe = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;
|
||||
var numCaptures = 0;
|
||||
var ret = '';
|
||||
for (var i = 0; i < regexps.length; i++) {
|
||||
var offset = numCaptures;
|
||||
var re = reStr(regexps[i]);
|
||||
if (i > 0) {
|
||||
ret += separator;
|
||||
}
|
||||
while (re.length > 0) {
|
||||
var match = backreferenceRe.exec(re);
|
||||
if (match == null) {
|
||||
ret += re;
|
||||
break;
|
||||
}
|
||||
ret += re.substring(0, match.index);
|
||||
re = re.substring(match.index + match[0].length);
|
||||
if (match[0][0] == '\\' && match[1]) {
|
||||
// Adjust the backreference.
|
||||
ret += '\\' + String(Number(match[1]) + offset);
|
||||
} else {
|
||||
ret += match[0];
|
||||
if (match[0] == '(') {
|
||||
numCaptures++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
function compileMode(mode, parent) {
|
||||
if (mode.compiled)
|
||||
return;
|
||||
mode.compiled = true;
|
||||
|
||||
mode.keywords = mode.keywords || mode.beginKeywords;
|
||||
if (mode.keywords) {
|
||||
var compiled_keywords = {};
|
||||
|
||||
var flatten = function (className, str) {
|
||||
if (language.case_insensitive) {
|
||||
str = str.toLowerCase();
|
||||
}
|
||||
str.split(' ').forEach(function (kw) {
|
||||
var pair = kw.split('|');
|
||||
compiled_keywords[pair[0]] = [className, pair[1] ? Number(pair[1]) : 1];
|
||||
});
|
||||
};
|
||||
|
||||
if (typeof mode.keywords === 'string') { // string
|
||||
flatten('keyword', mode.keywords);
|
||||
} else {
|
||||
objectKeys(mode.keywords).forEach(function (className) {
|
||||
flatten(className, mode.keywords[className]);
|
||||
});
|
||||
}
|
||||
mode.keywords = compiled_keywords;
|
||||
}
|
||||
mode.lexemesRe = langRe(mode.lexemes || /\w+/, true);
|
||||
|
||||
if (parent) {
|
||||
if (mode.beginKeywords) {
|
||||
mode.begin = '\\b(' + mode.beginKeywords.split(' ').join('|') + ')\\b';
|
||||
}
|
||||
if (!mode.begin)
|
||||
mode.begin = /\B|\b/;
|
||||
mode.beginRe = langRe(mode.begin);
|
||||
if (mode.endSameAsBegin)
|
||||
mode.end = mode.begin;
|
||||
if (!mode.end && !mode.endsWithParent)
|
||||
mode.end = /\B|\b/;
|
||||
if (mode.end)
|
||||
mode.endRe = langRe(mode.end);
|
||||
mode.terminator_end = reStr(mode.end) || '';
|
||||
if (mode.endsWithParent && parent.terminator_end)
|
||||
mode.terminator_end += (mode.end ? '|' : '') + parent.terminator_end;
|
||||
}
|
||||
if (mode.illegal)
|
||||
mode.illegalRe = langRe(mode.illegal);
|
||||
if (mode.relevance == null)
|
||||
mode.relevance = 1;
|
||||
if (!mode.contains) {
|
||||
mode.contains = [];
|
||||
}
|
||||
mode.contains = Array.prototype.concat.apply([], mode.contains.map(function (c) {
|
||||
return expand_mode(c === 'self' ? mode : c);
|
||||
}));
|
||||
mode.contains.forEach(function (c) {
|
||||
compileMode(c, mode);
|
||||
});
|
||||
|
||||
if (mode.starts) {
|
||||
compileMode(mode.starts, parent);
|
||||
}
|
||||
|
||||
var terminators =
|
||||
mode.contains.map(function (c) {
|
||||
return c.beginKeywords ? '\\.?(?:' + c.begin + ')\\.?' : c.begin;
|
||||
})
|
||||
.concat([mode.terminator_end, mode.illegal])
|
||||
.map(reStr)
|
||||
.filter(Boolean);
|
||||
mode.terminators = terminators.length ? langRe(joinRe(terminators, '|'), true) : {
|
||||
exec: function (/*s*/) {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
compileMode(language);
|
||||
}
|
||||
|
||||
/*
|
||||
Core highlighting function. Accepts a language name, or an alias, and a
|
||||
string with the code to highlight. Returns an object with the following
|
||||
properties:
|
||||
|
||||
- relevance (int)
|
||||
- value (an HTML string with highlighting markup)
|
||||
|
||||
*/
|
||||
function highlight(name, value, ignore_illegals, continuation) {
|
||||
|
||||
function escapeRe(value) {
|
||||
return new RegExp(value.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'), 'm');
|
||||
}
|
||||
|
||||
function subMode(lexeme, mode) {
|
||||
var i, length;
|
||||
|
||||
for (i = 0, length = mode.contains.length; i < length; i++) {
|
||||
if (testRe(mode.contains[i].beginRe, lexeme)) {
|
||||
if (mode.contains[i].endSameAsBegin) {
|
||||
mode.contains[i].endRe = escapeRe(mode.contains[i].beginRe.exec(lexeme)[0]);
|
||||
}
|
||||
return mode.contains[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function endOfMode(mode, lexeme) {
|
||||
if (testRe(mode.endRe, lexeme)) {
|
||||
while (mode.endsParent && mode.parent) {
|
||||
mode = mode.parent;
|
||||
}
|
||||
return mode;
|
||||
}
|
||||
if (mode.endsWithParent) {
|
||||
return endOfMode(mode.parent, lexeme);
|
||||
}
|
||||
}
|
||||
|
||||
function isIllegal(lexeme, mode) {
|
||||
return !ignore_illegals && testRe(mode.illegalRe, lexeme);
|
||||
}
|
||||
|
||||
function keywordMatch(mode, match) {
|
||||
var match_str = language.case_insensitive ? match[0].toLowerCase() : match[0];
|
||||
return mode.keywords.hasOwnProperty(match_str) && mode.keywords[match_str];
|
||||
}
|
||||
|
||||
function buildSpan(classname, insideSpan, leaveOpen, noPrefix) {
|
||||
var classPrefix = noPrefix ? '' : options.classPrefix,
|
||||
openSpan = '<span class="' + classPrefix,
|
||||
closeSpan = leaveOpen ? '' : spanEndTag;
|
||||
|
||||
openSpan += classname + '">';
|
||||
|
||||
if (!classname) return insideSpan;
|
||||
return openSpan + insideSpan + closeSpan;
|
||||
}
|
||||
|
||||
function processKeywords() {
|
||||
var keyword_match, last_index, match, result;
|
||||
|
||||
if (!top.keywords)
|
||||
return escape(mode_buffer);
|
||||
|
||||
result = '';
|
||||
last_index = 0;
|
||||
top.lexemesRe.lastIndex = 0;
|
||||
match = top.lexemesRe.exec(mode_buffer);
|
||||
|
||||
while (match) {
|
||||
result += escape(mode_buffer.substring(last_index, match.index));
|
||||
keyword_match = keywordMatch(top, match);
|
||||
if (keyword_match) {
|
||||
relevance += keyword_match[1];
|
||||
result += buildSpan(keyword_match[0], escape(match[0]));
|
||||
} else {
|
||||
result += escape(match[0]);
|
||||
}
|
||||
last_index = top.lexemesRe.lastIndex;
|
||||
match = top.lexemesRe.exec(mode_buffer);
|
||||
}
|
||||
return result + escape(mode_buffer.substr(last_index));
|
||||
}
|
||||
|
||||
function processSubLanguage() {
|
||||
var explicit = typeof top.subLanguage === 'string';
|
||||
if (explicit && !languages[top.subLanguage]) {
|
||||
return escape(mode_buffer);
|
||||
}
|
||||
|
||||
var result = explicit ?
|
||||
highlight(top.subLanguage, mode_buffer, true, continuations[top.subLanguage]) :
|
||||
highlightAuto(mode_buffer, top.subLanguage.length ? top.subLanguage : undefined);
|
||||
|
||||
// Counting embedded language score towards the host language may be disabled
|
||||
// with zeroing the containing mode relevance. Usecase in point is Markdown that
|
||||
// allows XML everywhere and makes every XML snippet to have a much larger Markdown
|
||||
// score.
|
||||
if (top.relevance > 0) {
|
||||
relevance += result.relevance;
|
||||
}
|
||||
if (explicit) {
|
||||
continuations[top.subLanguage] = result.top;
|
||||
}
|
||||
return buildSpan(result.language, result.value, false, true);
|
||||
}
|
||||
|
||||
function processBuffer() {
|
||||
result += (top.subLanguage != null ? processSubLanguage() : processKeywords());
|
||||
mode_buffer = '';
|
||||
}
|
||||
|
||||
function startNewMode(mode) {
|
||||
result += mode.className ? buildSpan(mode.className, '', true) : '';
|
||||
top = Object.create(mode, {parent: {value: top}});
|
||||
}
|
||||
|
||||
function processLexeme(buffer, lexeme) {
|
||||
|
||||
mode_buffer += buffer;
|
||||
|
||||
if (lexeme == null) {
|
||||
processBuffer();
|
||||
return 0;
|
||||
}
|
||||
|
||||
var new_mode = subMode(lexeme, top);
|
||||
if (new_mode) {
|
||||
if (new_mode.skip) {
|
||||
mode_buffer += lexeme;
|
||||
} else {
|
||||
if (new_mode.excludeBegin) {
|
||||
mode_buffer += lexeme;
|
||||
}
|
||||
processBuffer();
|
||||
if (!new_mode.returnBegin && !new_mode.excludeBegin) {
|
||||
mode_buffer = lexeme;
|
||||
}
|
||||
}
|
||||
startNewMode(new_mode, lexeme);
|
||||
return new_mode.returnBegin ? 0 : lexeme.length;
|
||||
}
|
||||
|
||||
var end_mode = endOfMode(top, lexeme);
|
||||
if (end_mode) {
|
||||
var origin = top;
|
||||
if (origin.skip) {
|
||||
mode_buffer += lexeme;
|
||||
} else {
|
||||
if (!(origin.returnEnd || origin.excludeEnd)) {
|
||||
mode_buffer += lexeme;
|
||||
}
|
||||
processBuffer();
|
||||
if (origin.excludeEnd) {
|
||||
mode_buffer = lexeme;
|
||||
}
|
||||
}
|
||||
do {
|
||||
if (top.className) {
|
||||
result += spanEndTag;
|
||||
}
|
||||
if (!top.skip && !top.subLanguage) {
|
||||
relevance += top.relevance;
|
||||
}
|
||||
top = top.parent;
|
||||
} while (top !== end_mode.parent);
|
||||
if (end_mode.starts) {
|
||||
if (end_mode.endSameAsBegin) {
|
||||
end_mode.starts.endRe = end_mode.endRe;
|
||||
}
|
||||
startNewMode(end_mode.starts, '');
|
||||
}
|
||||
return origin.returnEnd ? 0 : lexeme.length;
|
||||
}
|
||||
|
||||
if (isIllegal(lexeme, top))
|
||||
throw new Error('Illegal lexeme "' + lexeme + '" for mode "' + (top.className || '<unnamed>') + '"');
|
||||
|
||||
/*
|
||||
Parser should not reach this point as all types of lexemes should be caught
|
||||
earlier, but if it does due to some bug make sure it advances at least one
|
||||
character forward to prevent infinite looping.
|
||||
*/
|
||||
mode_buffer += lexeme;
|
||||
return lexeme.length || 1;
|
||||
}
|
||||
|
||||
var language = getLanguage(name);
|
||||
if (!language) {
|
||||
throw new Error('Unknown language: "' + name + '"');
|
||||
}
|
||||
|
||||
compileLanguage(language);
|
||||
var top = continuation || language;
|
||||
var continuations = {}; // keep continuations for sub-languages
|
||||
var result = '', current;
|
||||
for (current = top; current !== language; current = current.parent) {
|
||||
if (current.className) {
|
||||
result = buildSpan(current.className, '', true) + result;
|
||||
}
|
||||
}
|
||||
var mode_buffer = '';
|
||||
var relevance = 0;
|
||||
try {
|
||||
var match, count, index = 0;
|
||||
while (true) {
|
||||
top.terminators.lastIndex = index;
|
||||
match = top.terminators.exec(value);
|
||||
if (!match)
|
||||
break;
|
||||
count = processLexeme(value.substring(index, match.index), match[0]);
|
||||
index = match.index + count;
|
||||
}
|
||||
processLexeme(value.substr(index));
|
||||
for (current = top; current.parent; current = current.parent) { // close dangling modes
|
||||
if (current.className) {
|
||||
result += spanEndTag;
|
||||
}
|
||||
}
|
||||
return {
|
||||
relevance: relevance,
|
||||
value: result,
|
||||
language: name,
|
||||
top: top
|
||||
};
|
||||
} catch (e) {
|
||||
if (e.message && e.message.indexOf('Illegal') !== -1) {
|
||||
return {
|
||||
relevance: 0,
|
||||
value: escape(value)
|
||||
};
|
||||
} else {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Highlighting with language detection. Accepts a string with the code to
|
||||
highlight. Returns an object with the following properties:
|
||||
|
||||
- language (detected language)
|
||||
- relevance (int)
|
||||
- value (an HTML string with highlighting markup)
|
||||
- second_best (object with the same structure for second-best heuristically
|
||||
detected language, may be absent)
|
||||
|
||||
*/
|
||||
function highlightAuto(text, languageSubset) {
|
||||
languageSubset = languageSubset || options.languages || objectKeys(languages);
|
||||
var result = {
|
||||
relevance: 0,
|
||||
value: escape(text)
|
||||
};
|
||||
var second_best = result;
|
||||
languageSubset.filter(getLanguage).filter(autoDetection).forEach(function (name) {
|
||||
var current = highlight(name, text, false);
|
||||
current.language = name;
|
||||
if (current.relevance > second_best.relevance) {
|
||||
second_best = current;
|
||||
}
|
||||
if (current.relevance > result.relevance) {
|
||||
second_best = result;
|
||||
result = current;
|
||||
}
|
||||
});
|
||||
if (second_best.language) {
|
||||
result.second_best = second_best;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
Post-processing of the highlighted markup:
|
||||
|
||||
- replace TABs with something more useful
|
||||
- replace real line-breaks with '<br>' for non-pre containers
|
||||
|
||||
*/
|
||||
function fixMarkup(value) {
|
||||
return !(options.tabReplace || options.useBR)
|
||||
? value
|
||||
: value.replace(fixMarkupRe, function (match, p1) {
|
||||
if (options.useBR && match === '\n') {
|
||||
return '<br>';
|
||||
} else if (options.tabReplace) {
|
||||
return p1.replace(/\t/g, options.tabReplace);
|
||||
}
|
||||
return '';
|
||||
});
|
||||
}
|
||||
|
||||
function buildClassName(prevClassName, currentLang, resultLang) {
|
||||
var language = currentLang ? aliases[currentLang] : resultLang,
|
||||
result = [prevClassName.trim()];
|
||||
|
||||
if (!prevClassName.match(/\bhljs\b/)) {
|
||||
result.push('hljs');
|
||||
}
|
||||
|
||||
if (prevClassName.indexOf(language) === -1) {
|
||||
result.push(language);
|
||||
}
|
||||
|
||||
return result.join(' ').trim();
|
||||
}
|
||||
|
||||
/*
|
||||
Applies highlighting to a DOM node containing code. Accepts a DOM node and
|
||||
two optional parameters for fixMarkup.
|
||||
*/
|
||||
function highlightBlock(block) {
|
||||
var node, originalStream, result, resultNode, text;
|
||||
var language = blockLanguage(block);
|
||||
|
||||
if (isNotHighlighted(language))
|
||||
return;
|
||||
|
||||
if (options.useBR) {
|
||||
node = document.createElementNS('http://www.w3.org/1999/xhtml', 'div');
|
||||
node.innerHTML = block.innerHTML.replace(/\n/g, '').replace(/<br[ \/]*>/g, '\n');
|
||||
} else {
|
||||
node = block;
|
||||
}
|
||||
text = node.textContent;
|
||||
result = language ? highlight(language, text, true) : highlightAuto(text);
|
||||
|
||||
originalStream = nodeStream(node);
|
||||
if (originalStream.length) {
|
||||
resultNode = document.createElementNS('http://www.w3.org/1999/xhtml', 'div');
|
||||
resultNode.innerHTML = result.value;
|
||||
result.value = mergeStreams(originalStream, nodeStream(resultNode), text);
|
||||
}
|
||||
result.value = fixMarkup(result.value);
|
||||
|
||||
block.innerHTML = result.value;
|
||||
block.className = buildClassName(block.className, language, result.language);
|
||||
block.result = {
|
||||
language: result.language,
|
||||
re: result.relevance
|
||||
};
|
||||
if (result.second_best) {
|
||||
block.second_best = {
|
||||
language: result.second_best.language,
|
||||
re: result.second_best.relevance
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Updates highlight.js global options with values passed in the form of an object.
|
||||
*/
|
||||
function configure(user_options) {
|
||||
options = inherit(options, user_options);
|
||||
}
|
||||
|
||||
/*
|
||||
Applies highlighting to all <pre><code>..</code></pre> blocks on a page.
|
||||
*/
|
||||
function initHighlighting() {
|
||||
if (initHighlighting.called)
|
||||
return;
|
||||
initHighlighting.called = true;
|
||||
|
||||
var blocks = document.querySelectorAll('pre code');
|
||||
ArrayProto.forEach.call(blocks, highlightBlock);
|
||||
}
|
||||
|
||||
/*
|
||||
Attaches highlighting to the page load event.
|
||||
*/
|
||||
function initHighlightingOnLoad() {
|
||||
addEventListener('DOMContentLoaded', initHighlighting, false);
|
||||
addEventListener('load', initHighlighting, false);
|
||||
}
|
||||
|
||||
function registerLanguage(name, language) {
|
||||
var lang = languages[name] = language(hljs);
|
||||
restoreLanguageApi(lang);
|
||||
if (lang.aliases) {
|
||||
lang.aliases.forEach(function (alias) {
|
||||
aliases[alias] = name;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function listLanguages() {
|
||||
return objectKeys(languages);
|
||||
}
|
||||
|
||||
function getLanguage(name) {
|
||||
name = (name || '').toLowerCase();
|
||||
return languages[name] || languages[aliases[name]];
|
||||
}
|
||||
|
||||
function autoDetection(name) {
|
||||
var lang = getLanguage(name);
|
||||
return lang && !lang.disableAutodetect;
|
||||
}
|
||||
|
||||
/* Interface definition */
|
||||
|
||||
hljs.highlight = highlight;
|
||||
hljs.highlightAuto = highlightAuto;
|
||||
hljs.fixMarkup = fixMarkup;
|
||||
hljs.highlightBlock = highlightBlock;
|
||||
hljs.configure = configure;
|
||||
hljs.initHighlighting = initHighlighting;
|
||||
hljs.initHighlightingOnLoad = initHighlightingOnLoad;
|
||||
hljs.registerLanguage = registerLanguage;
|
||||
hljs.listLanguages = listLanguages;
|
||||
hljs.getLanguage = getLanguage;
|
||||
hljs.autoDetection = autoDetection;
|
||||
hljs.inherit = inherit;
|
||||
|
||||
// Common regexps
|
||||
hljs.IDENT_RE = '[a-zA-Z]\\w*';
|
||||
hljs.UNDERSCORE_IDENT_RE = '[a-zA-Z_]\\w*';
|
||||
hljs.NUMBER_RE = '\\b\\d+(\\.\\d+)?';
|
||||
hljs.C_NUMBER_RE = '(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)'; // 0x..., 0..., decimal, float
|
||||
hljs.BINARY_NUMBER_RE = '\\b(0b[01]+)'; // 0b...
|
||||
hljs.RE_STARTERS_RE = '!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~';
|
||||
|
||||
// Common modes
|
||||
hljs.BACKSLASH_ESCAPE = {
|
||||
begin: '\\\\[\\s\\S]', relevance: 0
|
||||
};
|
||||
hljs.APOS_STRING_MODE = {
|
||||
className: 'string',
|
||||
begin: '\'', end: '\'',
|
||||
illegal: '\\n',
|
||||
contains: [hljs.BACKSLASH_ESCAPE]
|
||||
};
|
||||
hljs.QUOTE_STRING_MODE = {
|
||||
className: 'string',
|
||||
begin: '"', end: '"',
|
||||
illegal: '\\n',
|
||||
contains: [hljs.BACKSLASH_ESCAPE]
|
||||
};
|
||||
hljs.PHRASAL_WORDS_MODE = {
|
||||
begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/
|
||||
};
|
||||
hljs.COMMENT = function (begin, end, inherits) {
|
||||
var mode = hljs.inherit(
|
||||
{
|
||||
className: 'comment',
|
||||
begin: begin, end: end,
|
||||
contains: []
|
||||
},
|
||||
inherits || {}
|
||||
);
|
||||
mode.contains.push(hljs.PHRASAL_WORDS_MODE);
|
||||
mode.contains.push({
|
||||
className: 'doctag',
|
||||
begin: '(?:TODO|FIXME|NOTE|BUG|XXX):',
|
||||
relevance: 0
|
||||
});
|
||||
return mode;
|
||||
};
|
||||
hljs.C_LINE_COMMENT_MODE = hljs.COMMENT('//', '$');
|
||||
hljs.C_BLOCK_COMMENT_MODE = hljs.COMMENT('/\\*', '\\*/');
|
||||
hljs.HASH_COMMENT_MODE = hljs.COMMENT('#', '$');
|
||||
hljs.NUMBER_MODE = {
|
||||
className: 'number',
|
||||
begin: hljs.NUMBER_RE,
|
||||
relevance: 0
|
||||
};
|
||||
hljs.C_NUMBER_MODE = {
|
||||
className: 'number',
|
||||
begin: hljs.C_NUMBER_RE,
|
||||
relevance: 0
|
||||
};
|
||||
hljs.BINARY_NUMBER_MODE = {
|
||||
className: 'number',
|
||||
begin: hljs.BINARY_NUMBER_RE,
|
||||
relevance: 0
|
||||
};
|
||||
hljs.CSS_NUMBER_MODE = {
|
||||
className: 'number',
|
||||
begin: hljs.NUMBER_RE + '(' +
|
||||
'%|em|ex|ch|rem' +
|
||||
'|vw|vh|vmin|vmax' +
|
||||
'|cm|mm|in|pt|pc|px' +
|
||||
'|deg|grad|rad|turn' +
|
||||
'|s|ms' +
|
||||
'|Hz|kHz' +
|
||||
'|dpi|dpcm|dppx' +
|
||||
')?',
|
||||
relevance: 0
|
||||
};
|
||||
hljs.REGEXP_MODE = {
|
||||
className: 'regexp',
|
||||
begin: /\//, end: /\/[gimuy]*/,
|
||||
illegal: /\n/,
|
||||
contains: [
|
||||
hljs.BACKSLASH_ESCAPE,
|
||||
{
|
||||
begin: /\[/, end: /\]/,
|
||||
relevance: 0,
|
||||
contains: [hljs.BACKSLASH_ESCAPE]
|
||||
}
|
||||
]
|
||||
};
|
||||
hljs.TITLE_MODE = {
|
||||
className: 'title',
|
||||
begin: hljs.IDENT_RE,
|
||||
relevance: 0
|
||||
};
|
||||
hljs.UNDERSCORE_TITLE_MODE = {
|
||||
className: 'title',
|
||||
begin: hljs.UNDERSCORE_IDENT_RE,
|
||||
relevance: 0
|
||||
};
|
||||
hljs.METHOD_GUARD = {
|
||||
// excludes method names from keyword processing
|
||||
begin: '\\.\\s*' + hljs.UNDERSCORE_IDENT_RE,
|
||||
relevance: 0
|
||||
};
|
||||
export default hljs
|
36
src/assets/js/hightlight/index.js
Normal file
36
src/assets/js/hightlight/index.js
Normal file
@ -0,0 +1,36 @@
|
||||
//hljs体积过大,多数为解决代码高亮显示的问题,所以只引入部分语言,如果需要可自行加载
|
||||
|
||||
import hljs from './highlight'
|
||||
|
||||
import javascript from './languages/javascript'
|
||||
import java from './languages/java';
|
||||
import css from './languages/css';
|
||||
import less from './languages/less';
|
||||
import go from './languages/go';
|
||||
import markdown from './languages/markdown';
|
||||
import php from './languages/php';
|
||||
import python from './languages/python';
|
||||
import typescript from './languages/typescript';
|
||||
import xml from './languages/xml';
|
||||
import autohotkey from './languages/autohotkey';
|
||||
import auto from './languages/autoit';
|
||||
|
||||
const languages = {
|
||||
javascript,
|
||||
java,
|
||||
css,
|
||||
less,
|
||||
markdown,
|
||||
go,
|
||||
php,
|
||||
python,
|
||||
typescript,
|
||||
xml,
|
||||
autohotkey,
|
||||
auto
|
||||
}
|
||||
Object.keys(languages).forEach(key => {
|
||||
hljs.registerLanguage(key, languages[key])
|
||||
})
|
||||
|
||||
export default hljs;
|
509
src/assets/js/hightlight/languages/1c.js
Normal file
509
src/assets/js/hightlight/languages/1c.js
Normal file
@ -0,0 +1,509 @@
|
||||
module.exports = function(hljs){
|
||||
|
||||
// общий паттерн для определения идентификаторов
|
||||
var UNDERSCORE_IDENT_RE = '[A-Za-zА-Яа-яёЁ_][A-Za-zА-Яа-яёЁ_0-9]+';
|
||||
|
||||
// v7 уникальные ключевые слова, отсутствующие в v8 ==> keyword
|
||||
var v7_keywords =
|
||||
'далее ';
|
||||
|
||||
// v8 ключевые слова ==> keyword
|
||||
var v8_keywords =
|
||||
'возврат вызватьисключение выполнить для если и из или иначе иначеесли исключение каждого конецесли ' +
|
||||
'конецпопытки конеццикла не новый перейти перем по пока попытка прервать продолжить тогда цикл экспорт ';
|
||||
|
||||
// keyword : ключевые слова
|
||||
var KEYWORD = v7_keywords + v8_keywords;
|
||||
|
||||
// v7 уникальные директивы, отсутствующие в v8 ==> meta-keyword
|
||||
var v7_meta_keywords =
|
||||
'загрузитьизфайла ';
|
||||
|
||||
// v8 ключевые слова в инструкциях препроцессора, директивах компиляции, аннотациях ==> meta-keyword
|
||||
var v8_meta_keywords =
|
||||
'вебклиент вместо внешнеесоединение клиент конецобласти мобильноеприложениеклиент мобильноеприложениесервер ' +
|
||||
'наклиенте наклиентенасервере наклиентенасерверебезконтекста насервере насерверебезконтекста область перед ' +
|
||||
'после сервер толстыйклиентобычноеприложение толстыйклиентуправляемоеприложение тонкийклиент ';
|
||||
|
||||
// meta-keyword : ключевые слова в инструкциях препроцессора, директивах компиляции, аннотациях
|
||||
var METAKEYWORD = v7_meta_keywords + v8_meta_keywords;
|
||||
|
||||
// v7 системные константы ==> built_in
|
||||
var v7_system_constants =
|
||||
'разделительстраниц разделительстрок символтабуляции ';
|
||||
|
||||
// v7 уникальные методы глобального контекста, отсутствующие в v8 ==> built_in
|
||||
var v7_global_context_methods =
|
||||
'ansitooem oemtoansi ввестивидсубконто ввестиперечисление ввестипериод ввестиплансчетов выбранныйплансчетов ' +
|
||||
'датагод датамесяц датачисло заголовоксистемы значениевстроку значениеизстроки каталогиб каталогпользователя ' +
|
||||
'кодсимв конгода конецпериодаби конецрассчитанногопериодаби конецстандартногоинтервала конквартала конмесяца ' +
|
||||
'коннедели лог лог10 максимальноеколичествосубконто названиеинтерфейса названиенабораправ назначитьвид ' +
|
||||
'назначитьсчет найтиссылки началопериодаби началостандартногоинтервала начгода начквартала начмесяца ' +
|
||||
'начнедели номерднягода номерднянедели номернеделигода обработкаожидания основнойжурналрасчетов ' +
|
||||
'основнойплансчетов основнойязык очиститьокносообщений периодстр получитьвремята получитьдатута ' +
|
||||
'получитьдокументта получитьзначенияотбора получитьпозициюта получитьпустоезначение получитьта ' +
|
||||
'префиксавтонумерации пропись пустоезначение разм разобратьпозициюдокумента рассчитатьрегистрына ' +
|
||||
'рассчитатьрегистрыпо симв создатьобъект статусвозврата стрколичествострок сформироватьпозициюдокумента ' +
|
||||
'счетпокоду текущеевремя типзначения типзначениястр установитьтана установитьтапо фиксшаблон шаблон ';
|
||||
|
||||
// v8 методы глобального контекста ==> built_in
|
||||
var v8_global_context_methods =
|
||||
'acos asin atan base64значение base64строка cos exp log log10 pow sin sqrt tan xmlзначение xmlстрока ' +
|
||||
'xmlтип xmlтипзнч активноеокно безопасныйрежим безопасныйрежимразделенияданных булево ввестидату ввестизначение ' +
|
||||
'ввестистроку ввестичисло возможностьчтенияxml вопрос восстановитьзначение врег выгрузитьжурналрегистрации ' +
|
||||
'выполнитьобработкуоповещения выполнитьпроверкуправдоступа вычислить год данныеформывзначение дата день деньгода ' +
|
||||
'деньнедели добавитьмесяц заблокироватьданныедляредактирования заблокироватьработупользователя завершитьработусистемы ' +
|
||||
'загрузитьвнешнююкомпоненту закрытьсправку записатьjson записатьxml записатьдатуjson записьжурналарегистрации ' +
|
||||
'заполнитьзначениясвойств запроситьразрешениепользователя запуститьприложение запуститьсистему зафиксироватьтранзакцию ' +
|
||||
'значениевданныеформы значениевстрокувнутр значениевфайл значениезаполнено значениеизстрокивнутр значениеизфайла ' +
|
||||
'изxmlтипа импортмоделиxdto имякомпьютера имяпользователя инициализироватьпредопределенныеданные информацияобошибке ' +
|
||||
'каталогбиблиотекимобильногоустройства каталогвременныхфайлов каталогдокументов каталогпрограммы кодироватьстроку ' +
|
||||
'кодлокализацииинформационнойбазы кодсимвола командасистемы конецгода конецдня конецквартала конецмесяца конецминуты ' +
|
||||
'конецнедели конецчаса конфигурациябазыданныхизмененадинамически конфигурацияизменена копироватьданныеформы ' +
|
||||
'копироватьфайл краткоепредставлениеошибки лев макс местноевремя месяц мин минута монопольныйрежим найти ' +
|
||||
'найтинедопустимыесимволыxml найтиокнопонавигационнойссылке найтипомеченныенаудаление найтипоссылкам найтифайлы ' +
|
||||
'началогода началодня началоквартала началомесяца началоминуты началонедели началочаса начатьзапросразрешенияпользователя ' +
|
||||
'начатьзапускприложения начатькопированиефайла начатьперемещениефайла начатьподключениевнешнейкомпоненты ' +
|
||||
'начатьподключениерасширенияработыскриптографией начатьподключениерасширенияработысфайлами начатьпоискфайлов ' +
|
||||
'начатьполучениекаталогавременныхфайлов начатьполучениекаталогадокументов начатьполучениерабочегокаталогаданныхпользователя ' +
|
||||
'начатьполучениефайлов начатьпомещениефайла начатьпомещениефайлов начатьсозданиедвоичныхданныхизфайла начатьсозданиекаталога ' +
|
||||
'начатьтранзакцию начатьудалениефайлов начатьустановкувнешнейкомпоненты начатьустановкурасширенияработыскриптографией ' +
|
||||
'начатьустановкурасширенияработысфайлами неделягода необходимостьзавершениясоединения номерсеансаинформационнойбазы ' +
|
||||
'номерсоединенияинформационнойбазы нрег нстр обновитьинтерфейс обновитьнумерациюобъектов обновитьповторноиспользуемыезначения ' +
|
||||
'обработкапрерыванияпользователя объединитьфайлы окр описаниеошибки оповестить оповеститьобизменении ' +
|
||||
'отключитьобработчикзапросанастроекклиенталицензирования отключитьобработчикожидания отключитьобработчикоповещения ' +
|
||||
'открытьзначение открытьиндекссправки открытьсодержаниесправки открытьсправку открытьформу открытьформумодально ' +
|
||||
'отменитьтранзакцию очиститьжурналрегистрации очиститьнастройкипользователя очиститьсообщения параметрыдоступа ' +
|
||||
'перейтипонавигационнойссылке переместитьфайл подключитьвнешнююкомпоненту ' +
|
||||
'подключитьобработчикзапросанастроекклиенталицензирования подключитьобработчикожидания подключитьобработчикоповещения ' +
|
||||
'подключитьрасширениеработыскриптографией подключитьрасширениеработысфайлами подробноепредставлениеошибки ' +
|
||||
'показатьвводдаты показатьвводзначения показатьвводстроки показатьвводчисла показатьвопрос показатьзначение ' +
|
||||
'показатьинформациюобошибке показатьнакарте показатьоповещениепользователя показатьпредупреждение полноеимяпользователя ' +
|
||||
'получитьcomобъект получитьxmlтип получитьадреспоместоположению получитьблокировкусеансов получитьвремязавершенияспящегосеанса ' +
|
||||
'получитьвремязасыпанияпассивногосеанса получитьвремяожиданияблокировкиданных получитьданныевыбора ' +
|
||||
'получитьдополнительныйпараметрклиенталицензирования получитьдопустимыекодылокализации получитьдопустимыечасовыепояса ' +
|
||||
'получитьзаголовокклиентскогоприложения получитьзаголовоксистемы получитьзначенияотборажурналарегистрации ' +
|
||||
'получитьидентификаторконфигурации получитьизвременногохранилища получитьимявременногофайла ' +
|
||||
'получитьимяклиенталицензирования получитьинформациюэкрановклиента получитьиспользованиежурналарегистрации ' +
|
||||
'получитьиспользованиесобытияжурналарегистрации получитькраткийзаголовокприложения получитьмакетоформления ' +
|
||||
'получитьмаскувсефайлы получитьмаскувсефайлыклиента получитьмаскувсефайлысервера получитьместоположениепоадресу ' +
|
||||
'получитьминимальнуюдлинупаролейпользователей получитьнавигационнуюссылку получитьнавигационнуюссылкуинформационнойбазы ' +
|
||||
'получитьобновлениеконфигурациибазыданных получитьобновлениепредопределенныхданныхинформационнойбазы получитьобщиймакет ' +
|
||||
'получитьобщуюформу получитьокна получитьоперативнуюотметкувремени получитьотключениебезопасногорежима ' +
|
||||
'получитьпараметрыфункциональныхопцийинтерфейса получитьполноеимяпредопределенногозначения ' +
|
||||
'получитьпредставлениянавигационныхссылок получитьпроверкусложностипаролейпользователей получитьразделительпути ' +
|
||||
'получитьразделительпутиклиента получитьразделительпутисервера получитьсеансыинформационнойбазы ' +
|
||||
'получитьскоростьклиентскогосоединения получитьсоединенияинформационнойбазы получитьсообщенияпользователю ' +
|
||||
'получитьсоответствиеобъектаиформы получитьсоставстандартногоинтерфейсаodata получитьструктурухранениябазыданных ' +
|
||||
'получитьтекущийсеансинформационнойбазы получитьфайл получитьфайлы получитьформу получитьфункциональнуюопцию ' +
|
||||
'получитьфункциональнуюопциюинтерфейса получитьчасовойпоясинформационнойбазы пользователиос поместитьвовременноехранилище ' +
|
||||
'поместитьфайл поместитьфайлы прав праводоступа предопределенноезначение представлениекодалокализации представлениепериода ' +
|
||||
'представлениеправа представлениеприложения представлениесобытияжурналарегистрации представлениечасовогопояса предупреждение ' +
|
||||
'прекратитьработусистемы привилегированныйрежим продолжитьвызов прочитатьjson прочитатьxml прочитатьдатуjson пустаястрока ' +
|
||||
'рабочийкаталогданныхпользователя разблокироватьданныедляредактирования разделитьфайл разорватьсоединениесвнешнимисточникомданных ' +
|
||||
'раскодироватьстроку рольдоступна секунда сигнал символ скопироватьжурналрегистрации смещениелетнеговремени ' +
|
||||
'смещениестандартноговремени соединитьбуферыдвоичныхданных создатькаталог создатьфабрикуxdto сокрл сокрлп сокрп сообщить ' +
|
||||
'состояние сохранитьзначение сохранитьнастройкипользователя сред стрдлина стрзаканчиваетсяна стрзаменить стрнайти стрначинаетсяс ' +
|
||||
'строка строкасоединенияинформационнойбазы стрполучитьстроку стрразделить стрсоединить стрсравнить стрчисловхождений '+
|
||||
'стрчислострок стршаблон текущаядата текущаядатасеанса текущаяуниверсальнаядата текущаяуниверсальнаядатавмиллисекундах ' +
|
||||
'текущийвариантинтерфейсаклиентскогоприложения текущийвариантосновногошрифтаклиентскогоприложения текущийкодлокализации ' +
|
||||
'текущийрежимзапуска текущийязык текущийязыксистемы тип типзнч транзакцияактивна трег удалитьданныеинформационнойбазы ' +
|
||||
'удалитьизвременногохранилища удалитьобъекты удалитьфайлы универсальноевремя установитьбезопасныйрежим ' +
|
||||
'установитьбезопасныйрежимразделенияданных установитьблокировкусеансов установитьвнешнююкомпоненту ' +
|
||||
'установитьвремязавершенияспящегосеанса установитьвремязасыпанияпассивногосеанса установитьвремяожиданияблокировкиданных ' +
|
||||
'установитьзаголовокклиентскогоприложения установитьзаголовоксистемы установитьиспользованиежурналарегистрации ' +
|
||||
'установитьиспользованиесобытияжурналарегистрации установитькраткийзаголовокприложения ' +
|
||||
'установитьминимальнуюдлинупаролейпользователей установитьмонопольныйрежим установитьнастройкиклиенталицензирования ' +
|
||||
'установитьобновлениепредопределенныхданныхинформационнойбазы установитьотключениебезопасногорежима ' +
|
||||
'установитьпараметрыфункциональныхопцийинтерфейса установитьпривилегированныйрежим ' +
|
||||
'установитьпроверкусложностипаролейпользователей установитьрасширениеработыскриптографией ' +
|
||||
'установитьрасширениеработысфайлами установитьсоединениесвнешнимисточникомданных установитьсоответствиеобъектаиформы ' +
|
||||
'установитьсоставстандартногоинтерфейсаodata установитьчасовойпоясинформационнойбазы установитьчасовойпояссеанса ' +
|
||||
'формат цел час часовойпояс часовойпояссеанса число числопрописью этоадресвременногохранилища ';
|
||||
|
||||
// v8 свойства глобального контекста ==> built_in
|
||||
var v8_global_context_property =
|
||||
'wsссылки библиотекакартинок библиотекамакетовоформлениякомпоновкиданных библиотекастилей бизнеспроцессы ' +
|
||||
'внешниеисточникиданных внешниеобработки внешниеотчеты встроенныепокупки главныйинтерфейс главныйстиль ' +
|
||||
'документы доставляемыеуведомления журналыдокументов задачи информацияобинтернетсоединении использованиерабочейдаты ' +
|
||||
'историяработыпользователя константы критерииотбора метаданные обработки отображениерекламы отправкадоставляемыхуведомлений ' +
|
||||
'отчеты панельзадачос параметрзапуска параметрысеанса перечисления планывидоврасчета планывидовхарактеристик ' +
|
||||
'планыобмена планысчетов полнотекстовыйпоиск пользователиинформационнойбазы последовательности проверкавстроенныхпокупок ' +
|
||||
'рабочаядата расширенияконфигурации регистрыбухгалтерии регистрынакопления регистрырасчета регистрысведений ' +
|
||||
'регламентныезадания сериализаторxdto справочники средствагеопозиционирования средствакриптографии средствамультимедиа ' +
|
||||
'средстваотображениярекламы средствапочты средствателефонии фабрикаxdto файловыепотоки фоновыезадания хранилищанастроек ' +
|
||||
'хранилищевариантовотчетов хранилищенастроекданныхформ хранилищеобщихнастроек хранилищепользовательскихнастроекдинамическихсписков ' +
|
||||
'хранилищепользовательскихнастроекотчетов хранилищесистемныхнастроек ';
|
||||
|
||||
// built_in : встроенные или библиотечные объекты (константы, классы, функции)
|
||||
var BUILTIN =
|
||||
v7_system_constants +
|
||||
v7_global_context_methods + v8_global_context_methods +
|
||||
v8_global_context_property;
|
||||
|
||||
// v8 системные наборы значений ==> class
|
||||
var v8_system_sets_of_values =
|
||||
'webцвета windowsцвета windowsшрифты библиотекакартинок рамкистиля символы цветастиля шрифтыстиля ';
|
||||
|
||||
// v8 системные перечисления - интерфейсные ==> class
|
||||
var v8_system_enums_interface =
|
||||
'автоматическоесохранениеданныхформывнастройках автонумерациявформе автораздвижениесерий ' +
|
||||
'анимациядиаграммы вариантвыравниванияэлементовизаголовков вариантуправлениявысотойтаблицы ' +
|
||||
'вертикальнаяпрокруткаформы вертикальноеположение вертикальноеположениеэлемента видгруппыформы ' +
|
||||
'виддекорацииформы виддополненияэлементаформы видизмененияданных видкнопкиформы видпереключателя ' +
|
||||
'видподписейкдиаграмме видполяформы видфлажка влияниеразмеранапузырекдиаграммы горизонтальноеположение ' +
|
||||
'горизонтальноеположениеэлемента группировкаколонок группировкаподчиненныхэлементовформы ' +
|
||||
'группыиэлементы действиеперетаскивания дополнительныйрежимотображения допустимыедействияперетаскивания ' +
|
||||
'интервалмеждуэлементамиформы использованиевывода использованиеполосыпрокрутки ' +
|
||||
'используемоезначениеточкибиржевойдиаграммы историявыборапривводе источникзначенийоситочекдиаграммы ' +
|
||||
'источникзначенияразмерапузырькадиаграммы категориягруппыкоманд максимумсерий начальноеотображениедерева ' +
|
||||
'начальноеотображениесписка обновлениетекстаредактирования ориентациядендрограммы ориентациядиаграммы ' +
|
||||
'ориентацияметокдиаграммы ориентацияметоксводнойдиаграммы ориентацияэлементаформы отображениевдиаграмме ' +
|
||||
'отображениевлегендедиаграммы отображениегруппыкнопок отображениезаголовкашкалыдиаграммы ' +
|
||||
'отображениезначенийсводнойдиаграммы отображениезначенияизмерительнойдиаграммы ' +
|
||||
'отображениеинтерваладиаграммыганта отображениекнопки отображениекнопкивыбора отображениеобсужденийформы ' +
|
||||
'отображениеобычнойгруппы отображениеотрицательныхзначенийпузырьковойдиаграммы отображениепанелипоиска ' +
|
||||
'отображениеподсказки отображениепредупрежденияприредактировании отображениеразметкиполосырегулирования ' +
|
||||
'отображениестраницформы отображениетаблицы отображениетекстазначениядиаграммыганта ' +
|
||||
'отображениеуправленияобычнойгруппы отображениефигурыкнопки палитрацветовдиаграммы поведениеобычнойгруппы ' +
|
||||
'поддержкамасштабадендрограммы поддержкамасштабадиаграммыганта поддержкамасштабасводнойдиаграммы ' +
|
||||
'поисквтаблицепривводе положениезаголовкаэлементаформы положениекартинкикнопкиформы ' +
|
||||
'положениекартинкиэлементаграфическойсхемы положениекоманднойпанелиформы положениекоманднойпанелиэлементаформы ' +
|
||||
'положениеопорнойточкиотрисовки положениеподписейкдиаграмме положениеподписейшкалызначенийизмерительнойдиаграммы ' +
|
||||
'положениесостоянияпросмотра положениестрокипоиска положениетекстасоединительнойлинии положениеуправленияпоиском ' +
|
||||
'положениешкалывремени порядокотображенияточекгоризонтальнойгистограммы порядоксерийвлегендедиаграммы ' +
|
||||
'размеркартинки расположениезаголовкашкалыдиаграммы растягиваниеповертикалидиаграммыганта ' +
|
||||
'режимавтоотображениясостояния режимвводастроктаблицы режимвыборанезаполненного режимвыделениядаты ' +
|
||||
'режимвыделениястрокитаблицы режимвыделениятаблицы режимизмененияразмера режимизменениясвязанногозначения ' +
|
||||
'режимиспользованиядиалогапечати режимиспользованияпараметракоманды режиммасштабированияпросмотра ' +
|
||||
'режимосновногоокнаклиентскогоприложения режимоткрытияокнаформы режимотображениявыделения ' +
|
||||
'режимотображениягеографическойсхемы режимотображениязначенийсерии режимотрисовкисеткиграфическойсхемы ' +
|
||||
'режимполупрозрачностидиаграммы режимпробеловдиаграммы режимразмещениянастранице режимредактированияколонки ' +
|
||||
'режимсглаживаниядиаграммы режимсглаживанияиндикатора режимсписказадач сквозноевыравнивание ' +
|
||||
'сохранениеданныхформывнастройках способзаполнениятекстазаголовкашкалыдиаграммы ' +
|
||||
'способопределенияограничивающегозначениядиаграммы стандартнаягруппакоманд стандартноеоформление ' +
|
||||
'статусоповещенияпользователя стильстрелки типаппроксимациилиниитрендадиаграммы типдиаграммы ' +
|
||||
'типединицышкалывремени типимпортасерийслоягеографическойсхемы типлиниигеографическойсхемы типлиниидиаграммы ' +
|
||||
'типмаркерагеографическойсхемы типмаркерадиаграммы типобластиоформления ' +
|
||||
'типорганизацииисточникаданныхгеографическойсхемы типотображениясериислоягеографическойсхемы ' +
|
||||
'типотображенияточечногообъектагеографическойсхемы типотображенияшкалыэлементалегендыгеографическойсхемы ' +
|
||||
'типпоискаобъектовгеографическойсхемы типпроекциигеографическойсхемы типразмещенияизмерений ' +
|
||||
'типразмещенияреквизитовизмерений типрамкиэлементауправления типсводнойдиаграммы ' +
|
||||
'типсвязидиаграммыганта типсоединениязначенийпосериямдиаграммы типсоединенияточекдиаграммы ' +
|
||||
'типсоединительнойлинии типстороныэлементаграфическойсхемы типформыотчета типшкалырадарнойдиаграммы ' +
|
||||
'факторлиниитрендадиаграммы фигуракнопки фигурыграфическойсхемы фиксациявтаблице форматдняшкалывремени ' +
|
||||
'форматкартинки ширинаподчиненныхэлементовформы ';
|
||||
|
||||
// v8 системные перечисления - свойства прикладных объектов ==> class
|
||||
var v8_system_enums_objects_properties =
|
||||
'виддвижениябухгалтерии виддвижениянакопления видпериодарегистрарасчета видсчета видточкимаршрутабизнеспроцесса ' +
|
||||
'использованиеагрегатарегистранакопления использованиегруппиэлементов использованиережимапроведения ' +
|
||||
'использованиесреза периодичностьагрегатарегистранакопления режимавтовремя режимзаписидокумента режимпроведениядокумента ';
|
||||
|
||||
// v8 системные перечисления - планы обмена ==> class
|
||||
var v8_system_enums_exchange_plans =
|
||||
'авторегистрацияизменений допустимыйномерсообщения отправкаэлементаданных получениеэлементаданных ';
|
||||
|
||||
// v8 системные перечисления - табличный документ ==> class
|
||||
var v8_system_enums_tabular_document =
|
||||
'использованиерасшифровкитабличногодокумента ориентациястраницы положениеитоговколоноксводнойтаблицы ' +
|
||||
'положениеитоговстроксводнойтаблицы положениетекстаотносительнокартинки расположениезаголовкагруппировкитабличногодокумента ' +
|
||||
'способчтениязначенийтабличногодокумента типдвустороннейпечати типзаполненияобластитабличногодокумента ' +
|
||||
'типкурсоровтабличногодокумента типлиниирисункатабличногодокумента типлинииячейкитабличногодокумента ' +
|
||||
'типнаправленияпереходатабличногодокумента типотображениявыделениятабличногодокумента типотображениялинийсводнойтаблицы ' +
|
||||
'типразмещениятекстатабличногодокумента типрисункатабличногодокумента типсмещениятабличногодокумента ' +
|
||||
'типузоратабличногодокумента типфайлатабличногодокумента точностьпечати чередованиерасположениястраниц ';
|
||||
|
||||
// v8 системные перечисления - планировщик ==> class
|
||||
var v8_system_enums_sheduler =
|
||||
'отображениевремениэлементовпланировщика ';
|
||||
|
||||
// v8 системные перечисления - форматированный документ ==> class
|
||||
var v8_system_enums_formatted_document =
|
||||
'типфайлаформатированногодокумента ';
|
||||
|
||||
// v8 системные перечисления - запрос ==> class
|
||||
var v8_system_enums_query =
|
||||
'обходрезультатазапроса типзаписизапроса ';
|
||||
|
||||
// v8 системные перечисления - построитель отчета ==> class
|
||||
var v8_system_enums_report_builder =
|
||||
'видзаполнениярасшифровкипостроителяотчета типдобавленияпредставлений типизмеренияпостроителяотчета типразмещенияитогов ';
|
||||
|
||||
// v8 системные перечисления - работа с файлами ==> class
|
||||
var v8_system_enums_files =
|
||||
'доступкфайлу режимдиалогавыборафайла режимоткрытияфайла ';
|
||||
|
||||
// v8 системные перечисления - построитель запроса ==> class
|
||||
var v8_system_enums_query_builder =
|
||||
'типизмеренияпостроителязапроса ';
|
||||
|
||||
// v8 системные перечисления - анализ данных ==> class
|
||||
var v8_system_enums_data_analysis =
|
||||
'видданныханализа методкластеризации типединицыинтервалавременианализаданных типзаполнениятаблицырезультатаанализаданных ' +
|
||||
'типиспользованиячисловыхзначенийанализаданных типисточникаданныхпоискаассоциаций типколонкианализаданныхдереворешений ' +
|
||||
'типколонкианализаданныхкластеризация типколонкианализаданныхобщаястатистика типколонкианализаданныхпоискассоциаций ' +
|
||||
'типколонкианализаданныхпоискпоследовательностей типколонкимоделипрогноза типмерырасстоянияанализаданных ' +
|
||||
'типотсеченияправилассоциации типполяанализаданных типстандартизациианализаданных типупорядочиванияправилассоциациианализаданных ' +
|
||||
'типупорядочиванияшаблоновпоследовательностейанализаданных типупрощениядереварешений ';
|
||||
|
||||
// v8 системные перечисления - xml, json, xs, dom, xdto, web-сервисы ==> class
|
||||
var v8_system_enums_xml_json_xs_dom_xdto_ws =
|
||||
'wsнаправлениепараметра вариантxpathxs вариантзаписидатыjson вариантпростоготипаxs видгруппымоделиxs видфасетаxdto ' +
|
||||
'действиепостроителяdom завершенностьпростоготипаxs завершенностьсоставноготипаxs завершенностьсхемыxs запрещенныеподстановкиxs ' +
|
||||
'исключениягруппподстановкиxs категорияиспользованияатрибутаxs категорияограниченияидентичностиxs категорияограниченияпространствименxs ' +
|
||||
'методнаследованияxs модельсодержимогоxs назначениетипаxml недопустимыеподстановкиxs обработкапробельныхсимволовxs обработкасодержимогоxs ' +
|
||||
'ограничениезначенияxs параметрыотбораузловdom переносстрокjson позициявдокументеdom пробельныесимволыxml типатрибутаxml типзначенияjson ' +
|
||||
'типканоническогоxml типкомпонентыxs типпроверкиxml типрезультатаdomxpath типузлаdom типузлаxml формаxml формапредставленияxs ' +
|
||||
'форматдатыjson экранированиесимволовjson ';
|
||||
|
||||
// v8 системные перечисления - система компоновки данных ==> class
|
||||
var v8_system_enums_data_composition_system =
|
||||
'видсравнениякомпоновкиданных действиеобработкирасшифровкикомпоновкиданных направлениесортировкикомпоновкиданных ' +
|
||||
'расположениевложенныхэлементоврезультатакомпоновкиданных расположениеитоговкомпоновкиданных расположениегруппировкикомпоновкиданных ' +
|
||||
'расположениеполейгруппировкикомпоновкиданных расположениеполякомпоновкиданных расположениереквизитовкомпоновкиданных ' +
|
||||
'расположениересурсовкомпоновкиданных типбухгалтерскогоостаткакомпоновкиданных типвыводатекстакомпоновкиданных ' +
|
||||
'типгруппировкикомпоновкиданных типгруппыэлементовотборакомпоновкиданных типдополненияпериодакомпоновкиданных ' +
|
||||
'типзаголовкаполейкомпоновкиданных типмакетагруппировкикомпоновкиданных типмакетаобластикомпоновкиданных типостаткакомпоновкиданных ' +
|
||||
'типпериодакомпоновкиданных типразмещениятекстакомпоновкиданных типсвязинаборовданныхкомпоновкиданных типэлементарезультатакомпоновкиданных ' +
|
||||
'расположениелегендыдиаграммыкомпоновкиданных типпримененияотборакомпоновкиданных режимотображенияэлементанастройкикомпоновкиданных ' +
|
||||
'режимотображениянастроеккомпоновкиданных состояниеэлементанастройкикомпоновкиданных способвосстановлениянастроеккомпоновкиданных ' +
|
||||
'режимкомпоновкирезультата использованиепараметракомпоновкиданных автопозицияресурсовкомпоновкиданных '+
|
||||
'вариантиспользованиягруппировкикомпоновкиданных расположениересурсоввдиаграммекомпоновкиданных фиксациякомпоновкиданных ' +
|
||||
'использованиеусловногооформлениякомпоновкиданных ';
|
||||
|
||||
// v8 системные перечисления - почта ==> class
|
||||
var v8_system_enums_email =
|
||||
'важностьинтернетпочтовогосообщения обработкатекстаинтернетпочтовогосообщения способкодированияинтернетпочтовоговложения ' +
|
||||
'способкодированиянеasciiсимволовинтернетпочтовогосообщения типтекстапочтовогосообщения протоколинтернетпочты ' +
|
||||
'статусразборапочтовогосообщения ';
|
||||
|
||||
// v8 системные перечисления - журнал регистрации ==> class
|
||||
var v8_system_enums_logbook =
|
||||
'режимтранзакциизаписижурналарегистрации статустранзакциизаписижурналарегистрации уровеньжурналарегистрации ';
|
||||
|
||||
// v8 системные перечисления - криптография ==> class
|
||||
var v8_system_enums_cryptography =
|
||||
'расположениехранилищасертификатовкриптографии режимвключениясертификатовкриптографии режимпроверкисертификатакриптографии ' +
|
||||
'типхранилищасертификатовкриптографии ';
|
||||
|
||||
// v8 системные перечисления - ZIP ==> class
|
||||
var v8_system_enums_zip =
|
||||
'кодировкаименфайловвzipфайле методсжатияzip методшифрованияzip режимвосстановленияпутейфайловzip режимобработкиподкаталоговzip ' +
|
||||
'режимсохраненияпутейzip уровеньсжатияzip ';
|
||||
|
||||
// v8 системные перечисления -
|
||||
// Блокировка данных, Фоновые задания, Автоматизированное тестирование,
|
||||
// Доставляемые уведомления, Встроенные покупки, Интернет, Работа с двоичными данными ==> class
|
||||
var v8_system_enums_other =
|
||||
'звуковоеоповещение направлениепереходакстроке позициявпотоке порядокбайтов режимблокировкиданных режимуправленияблокировкойданных ' +
|
||||
'сервисвстроенныхпокупок состояниефоновогозадания типподписчикадоставляемыхуведомлений уровеньиспользованиязащищенногосоединенияftp ';
|
||||
|
||||
// v8 системные перечисления - схема запроса ==> class
|
||||
var v8_system_enums_request_schema =
|
||||
'направлениепорядкасхемызапроса типдополненияпериодамисхемызапроса типконтрольнойточкисхемызапроса типобъединениясхемызапроса ' +
|
||||
'типпараметрадоступнойтаблицысхемызапроса типсоединениясхемызапроса ';
|
||||
|
||||
// v8 системные перечисления - свойства объектов метаданных ==> class
|
||||
var v8_system_enums_properties_of_metadata_objects =
|
||||
'httpметод автоиспользованиеобщегореквизита автопрефиксномеразадачи вариантвстроенногоязыка видиерархии видрегистранакопления ' +
|
||||
'видтаблицывнешнегоисточникаданных записьдвиженийприпроведении заполнениепоследовательностей индексирование ' +
|
||||
'использованиебазыпланавидоврасчета использованиебыстроговыбора использованиеобщегореквизита использованиеподчинения ' +
|
||||
'использованиеполнотекстовогопоиска использованиеразделяемыхданныхобщегореквизита использованиереквизита ' +
|
||||
'назначениеиспользованияприложения назначениерасширенияконфигурации направлениепередачи обновлениепредопределенныхданных ' +
|
||||
'оперативноепроведение основноепредставлениевидарасчета основноепредставлениевидахарактеристики основноепредставлениезадачи ' +
|
||||
'основноепредставлениепланаобмена основноепредставлениесправочника основноепредставлениесчета перемещениеграницыприпроведении ' +
|
||||
'периодичностьномерабизнеспроцесса периодичностьномерадокумента периодичностьрегистрарасчета периодичностьрегистрасведений ' +
|
||||
'повторноеиспользованиевозвращаемыхзначений полнотекстовыйпоискпривводепостроке принадлежностьобъекта проведение ' +
|
||||
'разделениеаутентификацииобщегореквизита разделениеданныхобщегореквизита разделениерасширенийконфигурацииобщегореквизита '+
|
||||
'режимавтонумерацииобъектов режимзаписирегистра режимиспользованиямодальности ' +
|
||||
'режимиспользованиясинхронныхвызововрасширенийплатформыивнешнихкомпонент режимповторногоиспользованиясеансов ' +
|
||||
'режимполученияданныхвыборапривводепостроке режимсовместимости режимсовместимостиинтерфейса ' +
|
||||
'режимуправленияблокировкойданныхпоумолчанию сериикодовпланавидовхарактеристик сериикодовпланасчетов ' +
|
||||
'сериикодовсправочника созданиепривводе способвыбора способпоискастрокипривводепостроке способредактирования ' +
|
||||
'типданныхтаблицывнешнегоисточникаданных типкодапланавидоврасчета типкодасправочника типмакета типномерабизнеспроцесса ' +
|
||||
'типномерадокумента типномеразадачи типформы удалениедвижений ';
|
||||
|
||||
// v8 системные перечисления - разные ==> class
|
||||
var v8_system_enums_differents =
|
||||
'важностьпроблемыприменениярасширенияконфигурации вариантинтерфейсаклиентскогоприложения вариантмасштабаформклиентскогоприложения ' +
|
||||
'вариантосновногошрифтаклиентскогоприложения вариантстандартногопериода вариантстандартнойдатыначала видграницы видкартинки ' +
|
||||
'видотображенияполнотекстовогопоиска видрамки видсравнения видцвета видчисловогозначения видшрифта допустимаядлина допустимыйзнак ' +
|
||||
'использованиеbyteordermark использованиеметаданныхполнотекстовогопоиска источникрасширенийконфигурации клавиша кодвозвратадиалога ' +
|
||||
'кодировкаxbase кодировкатекста направлениепоиска направлениесортировки обновлениепредопределенныхданных обновлениеприизмененииданных ' +
|
||||
'отображениепанелиразделов проверказаполнения режимдиалогавопрос режимзапускаклиентскогоприложения режимокругления режимоткрытияформприложения ' +
|
||||
'режимполнотекстовогопоиска скоростьклиентскогосоединения состояниевнешнегоисточникаданных состояниеобновленияконфигурациибазыданных ' +
|
||||
'способвыборасертификатаwindows способкодированиястроки статуссообщения типвнешнейкомпоненты типплатформы типповеденияклавишиenter ' +
|
||||
'типэлементаинформацииовыполненииобновленияконфигурациибазыданных уровеньизоляциитранзакций хешфункция частидаты';
|
||||
|
||||
// class: встроенные наборы значений, системные перечисления (содержат дочерние значения, обращения к которым через разыменование)
|
||||
var CLASS =
|
||||
v8_system_sets_of_values +
|
||||
v8_system_enums_interface +
|
||||
v8_system_enums_objects_properties +
|
||||
v8_system_enums_exchange_plans +
|
||||
v8_system_enums_tabular_document +
|
||||
v8_system_enums_sheduler +
|
||||
v8_system_enums_formatted_document +
|
||||
v8_system_enums_query +
|
||||
v8_system_enums_report_builder +
|
||||
v8_system_enums_files +
|
||||
v8_system_enums_query_builder +
|
||||
v8_system_enums_data_analysis +
|
||||
v8_system_enums_xml_json_xs_dom_xdto_ws +
|
||||
v8_system_enums_data_composition_system +
|
||||
v8_system_enums_email +
|
||||
v8_system_enums_logbook +
|
||||
v8_system_enums_cryptography +
|
||||
v8_system_enums_zip +
|
||||
v8_system_enums_other +
|
||||
v8_system_enums_request_schema +
|
||||
v8_system_enums_properties_of_metadata_objects +
|
||||
v8_system_enums_differents;
|
||||
|
||||
// v8 общие объекты (у объектов есть конструктор, экземпляры создаются методом НОВЫЙ) ==> type
|
||||
var v8_shared_object =
|
||||
'comобъект ftpсоединение httpзапрос httpсервисответ httpсоединение wsопределения wsпрокси xbase анализданных аннотацияxs ' +
|
||||
'блокировкаданных буфердвоичныхданных включениеxs выражениекомпоновкиданных генераторслучайныхчисел географическаясхема ' +
|
||||
'географическиекоординаты графическаясхема группамоделиxs данныерасшифровкикомпоновкиданных двоичныеданные дендрограмма ' +
|
||||
'диаграмма диаграммаганта диалогвыборафайла диалогвыборацвета диалогвыборашрифта диалограсписаниярегламентногозадания ' +
|
||||
'диалогредактированиястандартногопериода диапазон документdom документhtml документацияxs доставляемоеуведомление ' +
|
||||
'записьdom записьfastinfoset записьhtml записьjson записьxml записьzipфайла записьданных записьтекста записьузловdom ' +
|
||||
'запрос защищенноесоединениеopenssl значенияполейрасшифровкикомпоновкиданных извлечениетекста импортxs интернетпочта ' +
|
||||
'интернетпочтовоесообщение интернетпочтовыйпрофиль интернетпрокси интернетсоединение информациядляприложенияxs ' +
|
||||
'использованиеатрибутаxs использованиесобытияжурналарегистрации источникдоступныхнастроеккомпоновкиданных ' +
|
||||
'итераторузловdom картинка квалификаторыдаты квалификаторыдвоичныхданных квалификаторыстроки квалификаторычисла ' +
|
||||
'компоновщикмакетакомпоновкиданных компоновщикнастроеккомпоновкиданных конструктормакетаоформлениякомпоновкиданных ' +
|
||||
'конструкторнастроеккомпоновкиданных конструкторформатнойстроки линия макеткомпоновкиданных макетобластикомпоновкиданных ' +
|
||||
'макетоформлениякомпоновкиданных маскаxs менеджеркриптографии наборсхемxml настройкикомпоновкиданных настройкисериализацииjson ' +
|
||||
'обработкакартинок обработкарасшифровкикомпоновкиданных обходдереваdom объявлениеатрибутаxs объявлениенотацииxs ' +
|
||||
'объявлениеэлементаxs описаниеиспользованиясобытиядоступжурналарегистрации ' +
|
||||
'описаниеиспользованиясобытияотказвдоступежурналарегистрации описаниеобработкирасшифровкикомпоновкиданных ' +
|
||||
'описаниепередаваемогофайла описаниетипов определениегруппыатрибутовxs определениегруппымоделиxs ' +
|
||||
'определениеограниченияидентичностиxs определениепростоготипаxs определениесоставноготипаxs определениетипадокументаdom ' +
|
||||
'определенияxpathxs отборкомпоновкиданных пакетотображаемыхдокументов параметрвыбора параметркомпоновкиданных ' +
|
||||
'параметрызаписиjson параметрызаписиxml параметрычтенияxml переопределениеxs планировщик полеанализаданных ' +
|
||||
'полекомпоновкиданных построительdom построительзапроса построительотчета построительотчетаанализаданных ' +
|
||||
'построительсхемxml поток потоквпамяти почта почтовоесообщение преобразованиеxsl преобразованиекканоническомуxml ' +
|
||||
'процессорвыводарезультатакомпоновкиданныхвколлекциюзначений процессорвыводарезультатакомпоновкиданныхвтабличныйдокумент ' +
|
||||
'процессоркомпоновкиданных разыменовательпространствименdom рамка расписаниерегламентногозадания расширенноеимяxml ' +
|
||||
'результатчтенияданных своднаядиаграмма связьпараметравыбора связьпотипу связьпотипукомпоновкиданных сериализаторxdto ' +
|
||||
'сертификатклиентаwindows сертификатклиентафайл сертификаткриптографии сертификатыудостоверяющихцентровwindows ' +
|
||||
'сертификатыудостоверяющихцентровфайл сжатиеданных системнаяинформация сообщениепользователю сочетаниеклавиш ' +
|
||||
'сравнениезначений стандартнаядатаначала стандартныйпериод схемаxml схемакомпоновкиданных табличныйдокумент ' +
|
||||
'текстовыйдокумент тестируемоеприложение типданныхxml уникальныйидентификатор фабрикаxdto файл файловыйпоток ' +
|
||||
'фасетдлиныxs фасетколичестваразрядовдробнойчастиxs фасетмаксимальноговключающегозначенияxs ' +
|
||||
'фасетмаксимальногоисключающегозначенияxs фасетмаксимальнойдлиныxs фасетминимальноговключающегозначенияxs ' +
|
||||
'фасетминимальногоисключающегозначенияxs фасетминимальнойдлиныxs фасетобразцаxs фасетобщегоколичестваразрядовxs ' +
|
||||
'фасетперечисленияxs фасетпробельныхсимволовxs фильтрузловdom форматированнаястрока форматированныйдокумент ' +
|
||||
'фрагментxs хешированиеданных хранилищезначения цвет чтениеfastinfoset чтениеhtml чтениеjson чтениеxml чтениеzipфайла ' +
|
||||
'чтениеданных чтениетекста чтениеузловdom шрифт элементрезультатакомпоновкиданных ';
|
||||
|
||||
// v8 универсальные коллекции значений ==> type
|
||||
var v8_universal_collection =
|
||||
'comsafearray деревозначений массив соответствие списокзначений структура таблицазначений фиксированнаяструктура ' +
|
||||
'фиксированноесоответствие фиксированныймассив ';
|
||||
|
||||
// type : встроенные типы
|
||||
var TYPE =
|
||||
v8_shared_object +
|
||||
v8_universal_collection;
|
||||
|
||||
// literal : примитивные типы
|
||||
var LITERAL = 'null истина ложь неопределено';
|
||||
|
||||
// number : числа
|
||||
var NUMBERS = hljs.inherit(hljs.NUMBER_MODE);
|
||||
|
||||
// string : строки
|
||||
var STRINGS = {
|
||||
className: 'string',
|
||||
begin: '"|\\|', end: '"|$',
|
||||
contains: [{begin: '""'}]
|
||||
};
|
||||
|
||||
// number : даты
|
||||
var DATE = {
|
||||
begin: "'", end: "'", excludeBegin: true, excludeEnd: true,
|
||||
contains: [
|
||||
{
|
||||
className: 'number',
|
||||
begin: '\\d{4}([\\.\\\\/:-]?\\d{2}){0,5}'
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
// comment : комментарии
|
||||
var COMMENTS = hljs.inherit(hljs.C_LINE_COMMENT_MODE);
|
||||
|
||||
// meta : инструкции препроцессора, директивы компиляции
|
||||
var META = {
|
||||
className: 'meta',
|
||||
lexemes: UNDERSCORE_IDENT_RE,
|
||||
begin: '#|&', end: '$',
|
||||
keywords: {'meta-keyword': KEYWORD + METAKEYWORD},
|
||||
contains: [
|
||||
COMMENTS
|
||||
]
|
||||
};
|
||||
|
||||
// symbol : метка goto
|
||||
var SYMBOL = {
|
||||
className: 'symbol',
|
||||
begin: '~', end: ';|:', excludeEnd: true
|
||||
};
|
||||
|
||||
// function : объявление процедур и функций
|
||||
var FUNCTION = {
|
||||
className: 'function',
|
||||
lexemes: UNDERSCORE_IDENT_RE,
|
||||
variants: [
|
||||
{begin: 'процедура|функция', end: '\\)', keywords: 'процедура функция'},
|
||||
{begin: 'конецпроцедуры|конецфункции', keywords: 'конецпроцедуры конецфункции'}
|
||||
],
|
||||
contains: [
|
||||
{
|
||||
begin: '\\(', end: '\\)', endsParent : true,
|
||||
contains: [
|
||||
{
|
||||
className: 'params',
|
||||
lexemes: UNDERSCORE_IDENT_RE,
|
||||
begin: UNDERSCORE_IDENT_RE, end: ',', excludeEnd: true, endsWithParent: true,
|
||||
keywords: {
|
||||
keyword: 'знач',
|
||||
literal: LITERAL
|
||||
},
|
||||
contains: [
|
||||
NUMBERS,
|
||||
STRINGS,
|
||||
DATE
|
||||
]
|
||||
},
|
||||
COMMENTS
|
||||
]
|
||||
},
|
||||
hljs.inherit(hljs.TITLE_MODE, {begin: UNDERSCORE_IDENT_RE})
|
||||
]
|
||||
};
|
||||
|
||||
return {
|
||||
case_insensitive: true,
|
||||
lexemes: UNDERSCORE_IDENT_RE,
|
||||
keywords: {
|
||||
keyword: KEYWORD,
|
||||
built_in: BUILTIN,
|
||||
class: CLASS,
|
||||
type: TYPE,
|
||||
literal: LITERAL
|
||||
},
|
||||
contains: [
|
||||
META,
|
||||
FUNCTION,
|
||||
COMMENTS,
|
||||
SYMBOL,
|
||||
NUMBERS,
|
||||
STRINGS,
|
||||
DATE
|
||||
]
|
||||
}
|
||||
};
|
70
src/assets/js/hightlight/languages/abnf.js
Normal file
70
src/assets/js/hightlight/languages/abnf.js
Normal file
@ -0,0 +1,70 @@
|
||||
module.exports = function(hljs) {
|
||||
var regexes = {
|
||||
ruleDeclaration: "^[a-zA-Z][a-zA-Z0-9-]*",
|
||||
unexpectedChars: "[!@#$^&',?+~`|:]"
|
||||
};
|
||||
|
||||
var keywords = [
|
||||
"ALPHA",
|
||||
"BIT",
|
||||
"CHAR",
|
||||
"CR",
|
||||
"CRLF",
|
||||
"CTL",
|
||||
"DIGIT",
|
||||
"DQUOTE",
|
||||
"HEXDIG",
|
||||
"HTAB",
|
||||
"LF",
|
||||
"LWSP",
|
||||
"OCTET",
|
||||
"SP",
|
||||
"VCHAR",
|
||||
"WSP"
|
||||
];
|
||||
|
||||
var commentMode = hljs.COMMENT(";", "$");
|
||||
|
||||
var terminalBinaryMode = {
|
||||
className: "symbol",
|
||||
begin: /%b[0-1]+(-[0-1]+|(\.[0-1]+)+){0,1}/
|
||||
};
|
||||
|
||||
var terminalDecimalMode = {
|
||||
className: "symbol",
|
||||
begin: /%d[0-9]+(-[0-9]+|(\.[0-9]+)+){0,1}/
|
||||
};
|
||||
|
||||
var terminalHexadecimalMode = {
|
||||
className: "symbol",
|
||||
begin: /%x[0-9A-F]+(-[0-9A-F]+|(\.[0-9A-F]+)+){0,1}/,
|
||||
};
|
||||
|
||||
var caseSensitivityIndicatorMode = {
|
||||
className: "symbol",
|
||||
begin: /%[si]/
|
||||
};
|
||||
|
||||
var ruleDeclarationMode = {
|
||||
begin: regexes.ruleDeclaration + '\\s*=',
|
||||
returnBegin: true,
|
||||
end: /=/,
|
||||
relevance: 0,
|
||||
contains: [{className: "attribute", begin: regexes.ruleDeclaration}]
|
||||
};
|
||||
|
||||
return {
|
||||
illegal: regexes.unexpectedChars,
|
||||
keywords: keywords.join(" "),
|
||||
contains: [
|
||||
ruleDeclarationMode,
|
||||
commentMode,
|
||||
terminalBinaryMode,
|
||||
terminalDecimalMode,
|
||||
terminalHexadecimalMode,
|
||||
caseSensitivityIndicatorMode,
|
||||
hljs.QUOTE_STRING_MODE,
|
||||
hljs.NUMBER_MODE
|
||||
]
|
||||
};
|
||||
};
|
37
src/assets/js/hightlight/languages/accesslog.js
Normal file
37
src/assets/js/hightlight/languages/accesslog.js
Normal file
@ -0,0 +1,37 @@
|
||||
module.exports = function(hljs) {
|
||||
return {
|
||||
contains: [
|
||||
// IP
|
||||
{
|
||||
className: 'number',
|
||||
begin: '\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b'
|
||||
},
|
||||
// Other numbers
|
||||
{
|
||||
className: 'number',
|
||||
begin: '\\b\\d+\\b',
|
||||
relevance: 0
|
||||
},
|
||||
// Requests
|
||||
{
|
||||
className: 'string',
|
||||
begin: '"(GET|POST|HEAD|PUT|DELETE|CONNECT|OPTIONS|PATCH|TRACE)', end: '"',
|
||||
keywords: 'GET POST HEAD PUT DELETE CONNECT OPTIONS PATCH TRACE',
|
||||
illegal: '\\n',
|
||||
relevance: 10
|
||||
},
|
||||
// Dates
|
||||
{
|
||||
className: 'string',
|
||||
begin: /\[/, end: /\]/,
|
||||
illegal: '\\n'
|
||||
},
|
||||
// Strings
|
||||
{
|
||||
className: 'string',
|
||||
begin: '"', end: '"',
|
||||
illegal: '\\n'
|
||||
}
|
||||
]
|
||||
};
|
||||
};
|
73
src/assets/js/hightlight/languages/actionscript.js
Normal file
73
src/assets/js/hightlight/languages/actionscript.js
Normal file
@ -0,0 +1,73 @@
|
||||
module.exports = function(hljs) {
|
||||
var IDENT_RE = '[a-zA-Z_$][a-zA-Z0-9_$]*';
|
||||
var IDENT_FUNC_RETURN_TYPE_RE = '([*]|[a-zA-Z_$][a-zA-Z0-9_$]*)';
|
||||
|
||||
var AS3_REST_ARG_MODE = {
|
||||
className: 'rest_arg',
|
||||
begin: '[.]{3}', end: IDENT_RE,
|
||||
relevance: 10
|
||||
};
|
||||
|
||||
return {
|
||||
aliases: ['as'],
|
||||
keywords: {
|
||||
keyword: 'as break case catch class const continue default delete do dynamic each ' +
|
||||
'else extends final finally for function get if implements import in include ' +
|
||||
'instanceof interface internal is namespace native new override package private ' +
|
||||
'protected public return set static super switch this throw try typeof use var void ' +
|
||||
'while with',
|
||||
literal: 'true false null undefined'
|
||||
},
|
||||
contains: [
|
||||
hljs.APOS_STRING_MODE,
|
||||
hljs.QUOTE_STRING_MODE,
|
||||
hljs.C_LINE_COMMENT_MODE,
|
||||
hljs.C_BLOCK_COMMENT_MODE,
|
||||
hljs.C_NUMBER_MODE,
|
||||
{
|
||||
className: 'class',
|
||||
beginKeywords: 'package', end: '{',
|
||||
contains: [hljs.TITLE_MODE]
|
||||
},
|
||||
{
|
||||
className: 'class',
|
||||
beginKeywords: 'class interface', end: '{', excludeEnd: true,
|
||||
contains: [
|
||||
{
|
||||
beginKeywords: 'extends implements'
|
||||
},
|
||||
hljs.TITLE_MODE
|
||||
]
|
||||
},
|
||||
{
|
||||
className: 'meta',
|
||||
beginKeywords: 'import include', end: ';',
|
||||
keywords: {'meta-keyword': 'import include'}
|
||||
},
|
||||
{
|
||||
className: 'function',
|
||||
beginKeywords: 'function', end: '[{;]', excludeEnd: true,
|
||||
illegal: '\\S',
|
||||
contains: [
|
||||
hljs.TITLE_MODE,
|
||||
{
|
||||
className: 'params',
|
||||
begin: '\\(', end: '\\)',
|
||||
contains: [
|
||||
hljs.APOS_STRING_MODE,
|
||||
hljs.QUOTE_STRING_MODE,
|
||||
hljs.C_LINE_COMMENT_MODE,
|
||||
hljs.C_BLOCK_COMMENT_MODE,
|
||||
AS3_REST_ARG_MODE
|
||||
]
|
||||
},
|
||||
{
|
||||
begin: ':\\s*' + IDENT_FUNC_RETURN_TYPE_RE
|
||||
}
|
||||
]
|
||||
},
|
||||
hljs.METHOD_GUARD
|
||||
],
|
||||
illegal: /#/
|
||||
};
|
||||
};
|
172
src/assets/js/hightlight/languages/ada.js
Normal file
172
src/assets/js/hightlight/languages/ada.js
Normal file
@ -0,0 +1,172 @@
|
||||
module.exports = // We try to support full Ada2012
|
||||
//
|
||||
// We highlight all appearances of types, keywords, literals (string, char, number, bool)
|
||||
// and titles (user defined function/procedure/package)
|
||||
// CSS classes are set accordingly
|
||||
//
|
||||
// Languages causing problems for language detection:
|
||||
// xml (broken by Foo : Bar type), elm (broken by Foo : Bar type), vbscript-html (broken by body keyword)
|
||||
// sql (ada default.txt has a lot of sql keywords)
|
||||
|
||||
function(hljs) {
|
||||
// Regular expression for Ada numeric literals.
|
||||
// stolen form the VHDL highlighter
|
||||
|
||||
// Decimal literal:
|
||||
var INTEGER_RE = '\\d(_|\\d)*';
|
||||
var EXPONENT_RE = '[eE][-+]?' + INTEGER_RE;
|
||||
var DECIMAL_LITERAL_RE = INTEGER_RE + '(\\.' + INTEGER_RE + ')?' + '(' + EXPONENT_RE + ')?';
|
||||
|
||||
// Based literal:
|
||||
var BASED_INTEGER_RE = '\\w+';
|
||||
var BASED_LITERAL_RE = INTEGER_RE + '#' + BASED_INTEGER_RE + '(\\.' + BASED_INTEGER_RE + ')?' + '#' + '(' + EXPONENT_RE + ')?';
|
||||
|
||||
var NUMBER_RE = '\\b(' + BASED_LITERAL_RE + '|' + DECIMAL_LITERAL_RE + ')';
|
||||
|
||||
// Identifier regex
|
||||
var ID_REGEX = '[A-Za-z](_?[A-Za-z0-9.])*';
|
||||
|
||||
// bad chars, only allowed in literals
|
||||
var BAD_CHARS = '[]{}%#\'\"'
|
||||
|
||||
// Ada doesn't have block comments, only line comments
|
||||
var COMMENTS = hljs.COMMENT('--', '$');
|
||||
|
||||
// variable declarations of the form
|
||||
// Foo : Bar := Baz;
|
||||
// where only Bar will be highlighted
|
||||
var VAR_DECLS = {
|
||||
// TODO: These spaces are not required by the Ada syntax
|
||||
// however, I have yet to see handwritten Ada code where
|
||||
// someone does not put spaces around :
|
||||
begin: '\\s+:\\s+', end: '\\s*(:=|;|\\)|=>|$)',
|
||||
// endsWithParent: true,
|
||||
// returnBegin: true,
|
||||
illegal: BAD_CHARS,
|
||||
contains: [
|
||||
{
|
||||
// workaround to avoid highlighting
|
||||
// named loops and declare blocks
|
||||
beginKeywords: 'loop for declare others',
|
||||
endsParent: true,
|
||||
},
|
||||
{
|
||||
// properly highlight all modifiers
|
||||
className: 'keyword',
|
||||
beginKeywords: 'not null constant access function procedure in out aliased exception'
|
||||
},
|
||||
{
|
||||
className: 'type',
|
||||
begin: ID_REGEX,
|
||||
endsParent: true,
|
||||
relevance: 0,
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
return {
|
||||
case_insensitive: true,
|
||||
keywords: {
|
||||
keyword:
|
||||
'abort else new return abs elsif not reverse abstract end ' +
|
||||
'accept entry select access exception of separate aliased exit or some ' +
|
||||
'all others subtype and for out synchronized array function overriding ' +
|
||||
'at tagged generic package task begin goto pragma terminate ' +
|
||||
'body private then if procedure type case in protected constant interface ' +
|
||||
'is raise use declare range delay limited record when delta loop rem while ' +
|
||||
'digits renames with do mod requeue xor',
|
||||
literal:
|
||||
'True False',
|
||||
},
|
||||
contains: [
|
||||
COMMENTS,
|
||||
// strings "foobar"
|
||||
{
|
||||
className: 'string',
|
||||
begin: /"/, end: /"/,
|
||||
contains: [{begin: /""/, relevance: 0}]
|
||||
},
|
||||
// characters ''
|
||||
{
|
||||
// character literals always contain one char
|
||||
className: 'string',
|
||||
begin: /'.'/
|
||||
},
|
||||
{
|
||||
// number literals
|
||||
className: 'number',
|
||||
begin: NUMBER_RE,
|
||||
relevance: 0
|
||||
},
|
||||
{
|
||||
// Attributes
|
||||
className: 'symbol',
|
||||
begin: "'" + ID_REGEX,
|
||||
},
|
||||
{
|
||||
// package definition, maybe inside generic
|
||||
className: 'title',
|
||||
begin: '(\\bwith\\s+)?(\\bprivate\\s+)?\\bpackage\\s+(\\bbody\\s+)?', end: '(is|$)',
|
||||
keywords: 'package body',
|
||||
excludeBegin: true,
|
||||
excludeEnd: true,
|
||||
illegal: BAD_CHARS
|
||||
},
|
||||
{
|
||||
// function/procedure declaration/definition
|
||||
// maybe inside generic
|
||||
begin: '(\\b(with|overriding)\\s+)?\\b(function|procedure)\\s+', end: '(\\bis|\\bwith|\\brenames|\\)\\s*;)',
|
||||
keywords: 'overriding function procedure with is renames return',
|
||||
// we need to re-match the 'function' keyword, so that
|
||||
// the title mode below matches only exactly once
|
||||
returnBegin: true,
|
||||
contains:
|
||||
[
|
||||
COMMENTS,
|
||||
{
|
||||
// name of the function/procedure
|
||||
className: 'title',
|
||||
begin: '(\\bwith\\s+)?\\b(function|procedure)\\s+',
|
||||
end: '(\\(|\\s+|$)',
|
||||
excludeBegin: true,
|
||||
excludeEnd: true,
|
||||
illegal: BAD_CHARS
|
||||
},
|
||||
// 'self'
|
||||
// // parameter types
|
||||
VAR_DECLS,
|
||||
{
|
||||
// return type
|
||||
className: 'type',
|
||||
begin: '\\breturn\\s+', end: '(\\s+|;|$)',
|
||||
keywords: 'return',
|
||||
excludeBegin: true,
|
||||
excludeEnd: true,
|
||||
// we are done with functions
|
||||
endsParent: true,
|
||||
illegal: BAD_CHARS
|
||||
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
// new type declarations
|
||||
// maybe inside generic
|
||||
className: 'type',
|
||||
begin: '\\b(sub)?type\\s+', end: '\\s+',
|
||||
keywords: 'type',
|
||||
excludeBegin: true,
|
||||
illegal: BAD_CHARS
|
||||
},
|
||||
|
||||
// see comment above the definition
|
||||
VAR_DECLS,
|
||||
|
||||
// no markup
|
||||
// relevance boosters for small snippets
|
||||
// {begin: '\\s*=>\\s*'},
|
||||
// {begin: '\\s*:=\\s*'},
|
||||
// {begin: '\\s+:=\\s+'},
|
||||
]
|
||||
};
|
||||
};
|
106
src/assets/js/hightlight/languages/angelscript.js
Normal file
106
src/assets/js/hightlight/languages/angelscript.js
Normal file
@ -0,0 +1,106 @@
|
||||
module.exports = function(hljs) {
|
||||
var builtInTypeMode = {
|
||||
className: 'built_in',
|
||||
begin: '\\b(void|bool|int|int8|int16|int32|int64|uint|uint8|uint16|uint32|uint64|string|ref|array|double|float|auto|dictionary)'
|
||||
};
|
||||
|
||||
var objectHandleMode = {
|
||||
className: 'symbol',
|
||||
begin: '[a-zA-Z0-9_]+@'
|
||||
};
|
||||
|
||||
var genericMode = {
|
||||
className: 'keyword',
|
||||
begin: '<', end: '>',
|
||||
contains: [ builtInTypeMode, objectHandleMode ]
|
||||
};
|
||||
|
||||
builtInTypeMode.contains = [ genericMode ];
|
||||
objectHandleMode.contains = [ genericMode ];
|
||||
|
||||
return {
|
||||
aliases: [ 'asc' ],
|
||||
|
||||
keywords:
|
||||
'for in|0 break continue while do|0 return if else case switch namespace is cast ' +
|
||||
'or and xor not get|0 in inout|10 out override set|0 private public const default|0 ' +
|
||||
'final shared external mixin|10 enum typedef funcdef this super import from interface ' +
|
||||
'abstract|0 try catch protected explicit',
|
||||
|
||||
// avoid close detection with C# and JS
|
||||
illegal: '(^using\\s+[A-Za-z0-9_\\.]+;$|\\bfunction\s*[^\\(])',
|
||||
|
||||
contains: [
|
||||
{ // 'strings'
|
||||
className: 'string',
|
||||
begin: '\'', end: '\'',
|
||||
illegal: '\\n',
|
||||
contains: [ hljs.BACKSLASH_ESCAPE ],
|
||||
relevance: 0
|
||||
},
|
||||
|
||||
{ // "strings"
|
||||
className: 'string',
|
||||
begin: '"', end: '"',
|
||||
illegal: '\\n',
|
||||
contains: [ hljs.BACKSLASH_ESCAPE ],
|
||||
relevance: 0
|
||||
},
|
||||
|
||||
// """heredoc strings"""
|
||||
{
|
||||
className: 'string',
|
||||
begin: '"""', end: '"""'
|
||||
},
|
||||
|
||||
hljs.C_LINE_COMMENT_MODE, // single-line comments
|
||||
hljs.C_BLOCK_COMMENT_MODE, // comment blocks
|
||||
|
||||
{ // interface or namespace declaration
|
||||
beginKeywords: 'interface namespace', end: '{',
|
||||
illegal: '[;.\\-]',
|
||||
contains: [
|
||||
{ // interface or namespace name
|
||||
className: 'symbol',
|
||||
begin: '[a-zA-Z0-9_]+'
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{ // class declaration
|
||||
beginKeywords: 'class', end: '{',
|
||||
illegal: '[;.\\-]',
|
||||
contains: [
|
||||
{ // class name
|
||||
className: 'symbol',
|
||||
begin: '[a-zA-Z0-9_]+',
|
||||
contains: [
|
||||
{
|
||||
begin: '[:,]\\s*',
|
||||
contains: [
|
||||
{
|
||||
className: 'symbol',
|
||||
begin: '[a-zA-Z0-9_]+'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
builtInTypeMode, // built-in types
|
||||
objectHandleMode, // object handles
|
||||
|
||||
{ // literals
|
||||
className: 'literal',
|
||||
begin: '\\b(null|true|false)'
|
||||
},
|
||||
|
||||
{ // numbers
|
||||
className: 'number',
|
||||
begin: '(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?f?|\\.\\d+f?)([eE][-+]?\\d+f?)?)'
|
||||
}
|
||||
]
|
||||
};
|
||||
};
|
45
src/assets/js/hightlight/languages/apache.js
Normal file
45
src/assets/js/hightlight/languages/apache.js
Normal file
@ -0,0 +1,45 @@
|
||||
module.exports = function(hljs) {
|
||||
var NUMBER = {className: 'number', begin: '[\\$%]\\d+'};
|
||||
return {
|
||||
aliases: ['apacheconf'],
|
||||
case_insensitive: true,
|
||||
contains: [
|
||||
hljs.HASH_COMMENT_MODE,
|
||||
{className: 'section', begin: '</?', end: '>'},
|
||||
{
|
||||
className: 'attribute',
|
||||
begin: /\w+/,
|
||||
relevance: 0,
|
||||
// keywords aren’t needed for highlighting per se, they only boost relevance
|
||||
// for a very generally defined mode (starts with a word, ends with line-end
|
||||
keywords: {
|
||||
nomarkup:
|
||||
'order deny allow setenv rewriterule rewriteengine rewritecond documentroot ' +
|
||||
'sethandler errordocument loadmodule options header listen serverroot ' +
|
||||
'servername'
|
||||
},
|
||||
starts: {
|
||||
end: /$/,
|
||||
relevance: 0,
|
||||
keywords: {
|
||||
literal: 'on off all'
|
||||
},
|
||||
contains: [
|
||||
{
|
||||
className: 'meta',
|
||||
begin: '\\s\\[', end: '\\]$'
|
||||
},
|
||||
{
|
||||
className: 'variable',
|
||||
begin: '[\\$%]\\{', end: '\\}',
|
||||
contains: ['self', NUMBER]
|
||||
},
|
||||
NUMBER,
|
||||
hljs.QUOTE_STRING_MODE
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
illegal: /\S/
|
||||
};
|
||||
};
|
85
src/assets/js/hightlight/languages/applescript.js
Normal file
85
src/assets/js/hightlight/languages/applescript.js
Normal file
@ -0,0 +1,85 @@
|
||||
module.exports = function(hljs) {
|
||||
var STRING = hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: ''});
|
||||
var PARAMS = {
|
||||
className: 'params',
|
||||
begin: '\\(', end: '\\)',
|
||||
contains: ['self', hljs.C_NUMBER_MODE, STRING]
|
||||
};
|
||||
var COMMENT_MODE_1 = hljs.COMMENT('--', '$');
|
||||
var COMMENT_MODE_2 = hljs.COMMENT(
|
||||
'\\(\\*',
|
||||
'\\*\\)',
|
||||
{
|
||||
contains: ['self', COMMENT_MODE_1] //allow nesting
|
||||
}
|
||||
);
|
||||
var COMMENTS = [
|
||||
COMMENT_MODE_1,
|
||||
COMMENT_MODE_2,
|
||||
hljs.HASH_COMMENT_MODE
|
||||
];
|
||||
|
||||
return {
|
||||
aliases: ['osascript'],
|
||||
keywords: {
|
||||
keyword:
|
||||
'about above after against and around as at back before beginning ' +
|
||||
'behind below beneath beside between but by considering ' +
|
||||
'contain contains continue copy div does eighth else end equal ' +
|
||||
'equals error every exit fifth first for fourth from front ' +
|
||||
'get given global if ignoring in into is it its last local me ' +
|
||||
'middle mod my ninth not of on onto or over prop property put ref ' +
|
||||
'reference repeat returning script second set seventh since ' +
|
||||
'sixth some tell tenth that the|0 then third through thru ' +
|
||||
'timeout times to transaction try until where while whose with ' +
|
||||
'without',
|
||||
literal:
|
||||
'AppleScript false linefeed return pi quote result space tab true',
|
||||
built_in:
|
||||
'alias application boolean class constant date file integer list ' +
|
||||
'number real record string text ' +
|
||||
'activate beep count delay launch log offset read round ' +
|
||||
'run say summarize write ' +
|
||||
'character characters contents day frontmost id item length ' +
|
||||
'month name paragraph paragraphs rest reverse running time version ' +
|
||||
'weekday word words year'
|
||||
},
|
||||
contains: [
|
||||
STRING,
|
||||
hljs.C_NUMBER_MODE,
|
||||
{
|
||||
className: 'built_in',
|
||||
begin:
|
||||
'\\b(clipboard info|the clipboard|info for|list (disks|folder)|' +
|
||||
'mount volume|path to|(close|open for) access|(get|set) eof|' +
|
||||
'current date|do shell script|get volume settings|random number|' +
|
||||
'set volume|system attribute|system info|time to GMT|' +
|
||||
'(load|run|store) script|scripting components|' +
|
||||
'ASCII (character|number)|localized string|' +
|
||||
'choose (application|color|file|file name|' +
|
||||
'folder|from list|remote application|URL)|' +
|
||||
'display (alert|dialog))\\b|^\\s*return\\b'
|
||||
},
|
||||
{
|
||||
className: 'literal',
|
||||
begin:
|
||||
'\\b(text item delimiters|current application|missing value)\\b'
|
||||
},
|
||||
{
|
||||
className: 'keyword',
|
||||
begin:
|
||||
'\\b(apart from|aside from|instead of|out of|greater than|' +
|
||||
"isn't|(doesn't|does not) (equal|come before|come after|contain)|" +
|
||||
'(greater|less) than( or equal)?|(starts?|ends|begins?) with|' +
|
||||
'contained by|comes (before|after)|a (ref|reference)|POSIX file|' +
|
||||
'POSIX path|(date|time) string|quoted form)\\b'
|
||||
},
|
||||
{
|
||||
beginKeywords: 'on',
|
||||
illegal: '[${=;\\n]',
|
||||
contains: [hljs.UNDERSCORE_TITLE_MODE, PARAMS]
|
||||
}
|
||||
].concat(COMMENTS),
|
||||
illegal: '//|->|=>|\\[\\['
|
||||
};
|
||||
};
|
136
src/assets/js/hightlight/languages/arcade.js
Normal file
136
src/assets/js/hightlight/languages/arcade.js
Normal file
@ -0,0 +1,136 @@
|
||||
module.exports = function(hljs) {
|
||||
var IDENT_RE = '[A-Za-z_][0-9A-Za-z_]*';
|
||||
var KEYWORDS = {
|
||||
keyword:
|
||||
'if for while var new function do return void else break',
|
||||
literal:
|
||||
'true false null undefined NaN Infinity PI BackSlash DoubleQuote ForwardSlash NewLine SingleQuote Tab',
|
||||
built_in:
|
||||
'Abs Acos Area AreaGeodetic Asin Atan Atan2 Average Boolean Buffer BufferGeodetic ' +
|
||||
'Ceil Centroid Clip Console Constrain Contains Cos Count Crosses Cut Date DateAdd ' +
|
||||
'DateDiff Day Decode DefaultValue Dictionary Difference Disjoint Distance Distinct ' +
|
||||
'DomainCode DomainName Equals Exp Extent Feature FeatureSet FeatureSetById FeatureSetByTitle ' +
|
||||
'FeatureSetByUrl Filter First Floor Geometry Guid HasKey Hour IIf IndexOf Intersection ' +
|
||||
'Intersects IsEmpty Length LengthGeodetic Log Max Mean Millisecond Min Minute Month ' +
|
||||
'MultiPartToSinglePart Multipoint NextSequenceValue Now Number OrderBy Overlaps Point Polygon ' +
|
||||
'Polyline Pow Random Relate Reverse Round Second SetGeometry Sin Sort Sqrt Stdev Sum ' +
|
||||
'SymmetricDifference Tan Text Timestamp Today ToLocal Top Touches ToUTC TypeOf Union Variance ' +
|
||||
'Weekday When Within Year '
|
||||
};
|
||||
var EXPRESSIONS;
|
||||
var SYMBOL = {
|
||||
className: 'symbol',
|
||||
begin: '\\$[feature|layer|map|value|view]+'
|
||||
};
|
||||
var NUMBER = {
|
||||
className: 'number',
|
||||
variants: [
|
||||
{ begin: '\\b(0[bB][01]+)' },
|
||||
{ begin: '\\b(0[oO][0-7]+)' },
|
||||
{ begin: hljs.C_NUMBER_RE }
|
||||
],
|
||||
relevance: 0
|
||||
};
|
||||
var SUBST = {
|
||||
className: 'subst',
|
||||
begin: '\\$\\{', end: '\\}',
|
||||
keywords: KEYWORDS,
|
||||
contains: [] // defined later
|
||||
};
|
||||
var TEMPLATE_STRING = {
|
||||
className: 'string',
|
||||
begin: '`', end: '`',
|
||||
contains: [
|
||||
hljs.BACKSLASH_ESCAPE,
|
||||
SUBST
|
||||
]
|
||||
};
|
||||
SUBST.contains = [
|
||||
hljs.APOS_STRING_MODE,
|
||||
hljs.QUOTE_STRING_MODE,
|
||||
TEMPLATE_STRING,
|
||||
NUMBER,
|
||||
hljs.REGEXP_MODE
|
||||
];
|
||||
var PARAMS_CONTAINS = SUBST.contains.concat([
|
||||
hljs.C_BLOCK_COMMENT_MODE,
|
||||
hljs.C_LINE_COMMENT_MODE
|
||||
]);
|
||||
|
||||
return {
|
||||
aliases: ['arcade'],
|
||||
keywords: KEYWORDS,
|
||||
contains: [
|
||||
hljs.APOS_STRING_MODE,
|
||||
hljs.QUOTE_STRING_MODE,
|
||||
TEMPLATE_STRING,
|
||||
hljs.C_LINE_COMMENT_MODE,
|
||||
hljs.C_BLOCK_COMMENT_MODE,
|
||||
SYMBOL,
|
||||
NUMBER,
|
||||
{ // object attr container
|
||||
begin: /[{,]\s*/, relevance: 0,
|
||||
contains: [
|
||||
{
|
||||
begin: IDENT_RE + '\\s*:', returnBegin: true,
|
||||
relevance: 0,
|
||||
contains: [{className: 'attr', begin: IDENT_RE, relevance: 0}]
|
||||
}
|
||||
]
|
||||
},
|
||||
{ // "value" container
|
||||
begin: '(' + hljs.RE_STARTERS_RE + '|\\b(return)\\b)\\s*',
|
||||
keywords: 'return',
|
||||
contains: [
|
||||
hljs.C_LINE_COMMENT_MODE,
|
||||
hljs.C_BLOCK_COMMENT_MODE,
|
||||
hljs.REGEXP_MODE,
|
||||
{
|
||||
className: 'function',
|
||||
begin: '(\\(.*?\\)|' + IDENT_RE + ')\\s*=>', returnBegin: true,
|
||||
end: '\\s*=>',
|
||||
contains: [
|
||||
{
|
||||
className: 'params',
|
||||
variants: [
|
||||
{
|
||||
begin: IDENT_RE
|
||||
},
|
||||
{
|
||||
begin: /\(\s*\)/,
|
||||
},
|
||||
{
|
||||
begin: /\(/, end: /\)/,
|
||||
excludeBegin: true, excludeEnd: true,
|
||||
keywords: KEYWORDS,
|
||||
contains: PARAMS_CONTAINS
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
relevance: 0
|
||||
},
|
||||
{
|
||||
className: 'function',
|
||||
beginKeywords: 'function', end: /\{/, excludeEnd: true,
|
||||
contains: [
|
||||
hljs.inherit(hljs.TITLE_MODE, {begin: IDENT_RE}),
|
||||
{
|
||||
className: 'params',
|
||||
begin: /\(/, end: /\)/,
|
||||
excludeBegin: true,
|
||||
excludeEnd: true,
|
||||
contains: PARAMS_CONTAINS
|
||||
}
|
||||
],
|
||||
illegal: /\[|%/
|
||||
},
|
||||
{
|
||||
begin: /\$[(.]/
|
||||
}
|
||||
],
|
||||
illegal: /#(?!!)/
|
||||
};
|
||||
};
|
99
src/assets/js/hightlight/languages/arduino.js
Normal file
99
src/assets/js/hightlight/languages/arduino.js
Normal file
@ -0,0 +1,99 @@
|
||||
module.exports = function(hljs) {
|
||||
var CPP = hljs.getLanguage('cpp').exports;
|
||||
return {
|
||||
keywords: {
|
||||
keyword:
|
||||
'boolean byte word string String array ' + CPP.keywords.keyword,
|
||||
built_in:
|
||||
'setup loop while catch for if do goto try switch case else ' +
|
||||
'default break continue return ' +
|
||||
'KeyboardController MouseController SoftwareSerial ' +
|
||||
'EthernetServer EthernetClient LiquidCrystal ' +
|
||||
'RobotControl GSMVoiceCall EthernetUDP EsploraTFT ' +
|
||||
'HttpClient RobotMotor WiFiClient GSMScanner ' +
|
||||
'FileSystem Scheduler GSMServer YunClient YunServer ' +
|
||||
'IPAddress GSMClient GSMModem Keyboard Ethernet ' +
|
||||
'Console GSMBand Esplora Stepper Process ' +
|
||||
'WiFiUDP GSM_SMS Mailbox USBHost Firmata PImage ' +
|
||||
'Client Server GSMPIN FileIO Bridge Serial ' +
|
||||
'EEPROM Stream Mouse Audio Servo File Task ' +
|
||||
'GPRS WiFi Wire TFT GSM SPI SD ' +
|
||||
'runShellCommandAsynchronously analogWriteResolution ' +
|
||||
'retrieveCallingNumber printFirmwareVersion ' +
|
||||
'analogReadResolution sendDigitalPortPair ' +
|
||||
'noListenOnLocalhost readJoystickButton setFirmwareVersion ' +
|
||||
'readJoystickSwitch scrollDisplayRight getVoiceCallStatus ' +
|
||||
'scrollDisplayLeft writeMicroseconds delayMicroseconds ' +
|
||||
'beginTransmission getSignalStrength runAsynchronously ' +
|
||||
'getAsynchronously listenOnLocalhost getCurrentCarrier ' +
|
||||
'readAccelerometer messageAvailable sendDigitalPorts ' +
|
||||
'lineFollowConfig countryNameWrite runShellCommand ' +
|
||||
'readStringUntil rewindDirectory readTemperature ' +
|
||||
'setClockDivider readLightSensor endTransmission ' +
|
||||
'analogReference detachInterrupt countryNameRead ' +
|
||||
'attachInterrupt encryptionType readBytesUntil ' +
|
||||
'robotNameWrite readMicrophone robotNameRead cityNameWrite ' +
|
||||
'userNameWrite readJoystickY readJoystickX mouseReleased ' +
|
||||
'openNextFile scanNetworks noInterrupts digitalWrite ' +
|
||||
'beginSpeaker mousePressed isActionDone mouseDragged ' +
|
||||
'displayLogos noAutoscroll addParameter remoteNumber ' +
|
||||
'getModifiers keyboardRead userNameRead waitContinue ' +
|
||||
'processInput parseCommand printVersion readNetworks ' +
|
||||
'writeMessage blinkVersion cityNameRead readMessage ' +
|
||||
'setDataMode parsePacket isListening setBitOrder ' +
|
||||
'beginPacket isDirectory motorsWrite drawCompass ' +
|
||||
'digitalRead clearScreen serialEvent rightToLeft ' +
|
||||
'setTextSize leftToRight requestFrom keyReleased ' +
|
||||
'compassRead analogWrite interrupts WiFiServer ' +
|
||||
'disconnect playMelody parseFloat autoscroll ' +
|
||||
'getPINUsed setPINUsed setTimeout sendAnalog ' +
|
||||
'readSlider analogRead beginWrite createChar ' +
|
||||
'motorsStop keyPressed tempoWrite readButton ' +
|
||||
'subnetMask debugPrint macAddress writeGreen ' +
|
||||
'randomSeed attachGPRS readString sendString ' +
|
||||
'remotePort releaseAll mouseMoved background ' +
|
||||
'getXChange getYChange answerCall getResult ' +
|
||||
'voiceCall endPacket constrain getSocket writeJSON ' +
|
||||
'getButton available connected findUntil readBytes ' +
|
||||
'exitValue readGreen writeBlue startLoop IPAddress ' +
|
||||
'isPressed sendSysex pauseMode gatewayIP setCursor ' +
|
||||
'getOemKey tuneWrite noDisplay loadImage switchPIN ' +
|
||||
'onRequest onReceive changePIN playFile noBuffer ' +
|
||||
'parseInt overflow checkPIN knobRead beginTFT ' +
|
||||
'bitClear updateIR bitWrite position writeRGB ' +
|
||||
'highByte writeRed setSpeed readBlue noStroke ' +
|
||||
'remoteIP transfer shutdown hangCall beginSMS ' +
|
||||
'endWrite attached maintain noCursor checkReg ' +
|
||||
'checkPUK shiftOut isValid shiftIn pulseIn ' +
|
||||
'connect println localIP pinMode getIMEI ' +
|
||||
'display noBlink process getBand running beginSD ' +
|
||||
'drawBMP lowByte setBand release bitRead prepare ' +
|
||||
'pointTo readRed setMode noFill remove listen ' +
|
||||
'stroke detach attach noTone exists buffer ' +
|
||||
'height bitSet circle config cursor random ' +
|
||||
'IRread setDNS endSMS getKey micros ' +
|
||||
'millis begin print write ready flush width ' +
|
||||
'isPIN blink clear press mkdir rmdir close ' +
|
||||
'point yield image BSSID click delay ' +
|
||||
'read text move peek beep rect line open ' +
|
||||
'seek fill size turn stop home find ' +
|
||||
'step tone sqrt RSSI SSID ' +
|
||||
'end bit tan cos sin pow map abs max ' +
|
||||
'min get run put',
|
||||
literal:
|
||||
'DIGITAL_MESSAGE FIRMATA_STRING ANALOG_MESSAGE ' +
|
||||
'REPORT_DIGITAL REPORT_ANALOG INPUT_PULLUP ' +
|
||||
'SET_PIN_MODE INTERNAL2V56 SYSTEM_RESET LED_BUILTIN ' +
|
||||
'INTERNAL1V1 SYSEX_START INTERNAL EXTERNAL ' +
|
||||
'DEFAULT OUTPUT INPUT HIGH LOW'
|
||||
},
|
||||
contains: [
|
||||
CPP.preprocessor,
|
||||
hljs.C_LINE_COMMENT_MODE,
|
||||
hljs.C_BLOCK_COMMENT_MODE,
|
||||
hljs.APOS_STRING_MODE,
|
||||
hljs.QUOTE_STRING_MODE,
|
||||
hljs.C_NUMBER_MODE
|
||||
]
|
||||
};
|
||||
};
|
91
src/assets/js/hightlight/languages/armasm.js
Normal file
91
src/assets/js/hightlight/languages/armasm.js
Normal file
@ -0,0 +1,91 @@
|
||||
module.exports = function(hljs) {
|
||||
//local labels: %?[FB]?[AT]?\d{1,2}\w+
|
||||
return {
|
||||
case_insensitive: true,
|
||||
aliases: ['arm'],
|
||||
lexemes: '\\.?' + hljs.IDENT_RE,
|
||||
keywords: {
|
||||
meta:
|
||||
//GNU preprocs
|
||||
'.2byte .4byte .align .ascii .asciz .balign .byte .code .data .else .end .endif .endm .endr .equ .err .exitm .extern .global .hword .if .ifdef .ifndef .include .irp .long .macro .rept .req .section .set .skip .space .text .word .arm .thumb .code16 .code32 .force_thumb .thumb_func .ltorg '+
|
||||
//ARM directives
|
||||
'ALIAS ALIGN ARM AREA ASSERT ATTR CN CODE CODE16 CODE32 COMMON CP DATA DCB DCD DCDU DCDO DCFD DCFDU DCI DCQ DCQU DCW DCWU DN ELIF ELSE END ENDFUNC ENDIF ENDP ENTRY EQU EXPORT EXPORTAS EXTERN FIELD FILL FUNCTION GBLA GBLL GBLS GET GLOBAL IF IMPORT INCBIN INCLUDE INFO KEEP LCLA LCLL LCLS LTORG MACRO MAP MEND MEXIT NOFP OPT PRESERVE8 PROC QN READONLY RELOC REQUIRE REQUIRE8 RLIST FN ROUT SETA SETL SETS SN SPACE SUBT THUMB THUMBX TTL WHILE WEND ',
|
||||
built_in:
|
||||
'r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 '+ //standard registers
|
||||
'pc lr sp ip sl sb fp '+ //typical regs plus backward compatibility
|
||||
'a1 a2 a3 a4 v1 v2 v3 v4 v5 v6 v7 v8 f0 f1 f2 f3 f4 f5 f6 f7 '+ //more regs and fp
|
||||
'p0 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 '+ //coprocessor regs
|
||||
'c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 '+ //more coproc
|
||||
'q0 q1 q2 q3 q4 q5 q6 q7 q8 q9 q10 q11 q12 q13 q14 q15 '+ //advanced SIMD NEON regs
|
||||
|
||||
//program status registers
|
||||
'cpsr_c cpsr_x cpsr_s cpsr_f cpsr_cx cpsr_cxs cpsr_xs cpsr_xsf cpsr_sf cpsr_cxsf '+
|
||||
'spsr_c spsr_x spsr_s spsr_f spsr_cx spsr_cxs spsr_xs spsr_xsf spsr_sf spsr_cxsf '+
|
||||
|
||||
//NEON and VFP registers
|
||||
's0 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 '+
|
||||
's16 s17 s18 s19 s20 s21 s22 s23 s24 s25 s26 s27 s28 s29 s30 s31 '+
|
||||
'd0 d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 d13 d14 d15 '+
|
||||
'd16 d17 d18 d19 d20 d21 d22 d23 d24 d25 d26 d27 d28 d29 d30 d31 ' +
|
||||
|
||||
'{PC} {VAR} {TRUE} {FALSE} {OPT} {CONFIG} {ENDIAN} {CODESIZE} {CPU} {FPU} {ARCHITECTURE} {PCSTOREOFFSET} {ARMASM_VERSION} {INTER} {ROPI} {RWPI} {SWST} {NOSWST} . @'
|
||||
},
|
||||
contains: [
|
||||
{
|
||||
className: 'keyword',
|
||||
begin: '\\b('+ //mnemonics
|
||||
'adc|'+
|
||||
'(qd?|sh?|u[qh]?)?add(8|16)?|usada?8|(q|sh?|u[qh]?)?(as|sa)x|'+
|
||||
'and|adrl?|sbc|rs[bc]|asr|b[lx]?|blx|bxj|cbn?z|tb[bh]|bic|'+
|
||||
'bfc|bfi|[su]bfx|bkpt|cdp2?|clz|clrex|cmp|cmn|cpsi[ed]|cps|'+
|
||||
'setend|dbg|dmb|dsb|eor|isb|it[te]{0,3}|lsl|lsr|ror|rrx|'+
|
||||
'ldm(([id][ab])|f[ds])?|ldr((s|ex)?[bhd])?|movt?|mvn|mra|mar|'+
|
||||
'mul|[us]mull|smul[bwt][bt]|smu[as]d|smmul|smmla|'+
|
||||
'mla|umlaal|smlal?([wbt][bt]|d)|mls|smlsl?[ds]|smc|svc|sev|'+
|
||||
'mia([bt]{2}|ph)?|mrr?c2?|mcrr2?|mrs|msr|orr|orn|pkh(tb|bt)|rbit|'+
|
||||
'rev(16|sh)?|sel|[su]sat(16)?|nop|pop|push|rfe([id][ab])?|'+
|
||||
'stm([id][ab])?|str(ex)?[bhd]?|(qd?)?sub|(sh?|q|u[qh]?)?sub(8|16)|'+
|
||||
'[su]xt(a?h|a?b(16)?)|srs([id][ab])?|swpb?|swi|smi|tst|teq|'+
|
||||
'wfe|wfi|yield'+
|
||||
')'+
|
||||
'(eq|ne|cs|cc|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al|hs|lo)?'+ //condition codes
|
||||
'[sptrx]?' , //legal postfixes
|
||||
end: '\\s'
|
||||
},
|
||||
hljs.COMMENT('[;@]', '$', {relevance: 0}),
|
||||
hljs.C_BLOCK_COMMENT_MODE,
|
||||
hljs.QUOTE_STRING_MODE,
|
||||
{
|
||||
className: 'string',
|
||||
begin: '\'',
|
||||
end: '[^\\\\]\'',
|
||||
relevance: 0
|
||||
},
|
||||
{
|
||||
className: 'title',
|
||||
begin: '\\|', end: '\\|',
|
||||
illegal: '\\n',
|
||||
relevance: 0
|
||||
},
|
||||
{
|
||||
className: 'number',
|
||||
variants: [
|
||||
{begin: '[#$=]?0x[0-9a-f]+'}, //hex
|
||||
{begin: '[#$=]?0b[01]+'}, //bin
|
||||
{begin: '[#$=]\\d+'}, //literal
|
||||
{begin: '\\b\\d+'} //bare number
|
||||
],
|
||||
relevance: 0
|
||||
},
|
||||
{
|
||||
className: 'symbol',
|
||||
variants: [
|
||||
{begin: '^[a-z_\\.\\$][a-z0-9_\\.\\$]+'}, //ARM syntax
|
||||
{begin: '^\\s*[a-z_\\.\\$][a-z0-9_\\.\\$]+:'}, //GNU ARM syntax
|
||||
{begin: '[=#]\\w+' } //label reference
|
||||
],
|
||||
relevance: 0
|
||||
}
|
||||
]
|
||||
};
|
||||
};
|
187
src/assets/js/hightlight/languages/asciidoc.js
Normal file
187
src/assets/js/hightlight/languages/asciidoc.js
Normal file
@ -0,0 +1,187 @@
|
||||
module.exports = function(hljs) {
|
||||
return {
|
||||
aliases: ['adoc'],
|
||||
contains: [
|
||||
// block comment
|
||||
hljs.COMMENT(
|
||||
'^/{4,}\\n',
|
||||
'\\n/{4,}$',
|
||||
// can also be done as...
|
||||
//'^/{4,}$',
|
||||
//'^/{4,}$',
|
||||
{
|
||||
relevance: 10
|
||||
}
|
||||
),
|
||||
// line comment
|
||||
hljs.COMMENT(
|
||||
'^//',
|
||||
'$',
|
||||
{
|
||||
relevance: 0
|
||||
}
|
||||
),
|
||||
// title
|
||||
{
|
||||
className: 'title',
|
||||
begin: '^\\.\\w.*$'
|
||||
},
|
||||
// example, admonition & sidebar blocks
|
||||
{
|
||||
begin: '^[=\\*]{4,}\\n',
|
||||
end: '\\n^[=\\*]{4,}$',
|
||||
relevance: 10
|
||||
},
|
||||
// headings
|
||||
{
|
||||
className: 'section',
|
||||
relevance: 10,
|
||||
variants: [
|
||||
{begin: '^(={1,5}) .+?( \\1)?$'},
|
||||
{begin: '^[^\\[\\]\\n]+?\\n[=\\-~\\^\\+]{2,}$'},
|
||||
]
|
||||
},
|
||||
// document attributes
|
||||
{
|
||||
className: 'meta',
|
||||
begin: '^:.+?:',
|
||||
end: '\\s',
|
||||
excludeEnd: true,
|
||||
relevance: 10
|
||||
},
|
||||
// block attributes
|
||||
{
|
||||
className: 'meta',
|
||||
begin: '^\\[.+?\\]$',
|
||||
relevance: 0
|
||||
},
|
||||
// quoteblocks
|
||||
{
|
||||
className: 'quote',
|
||||
begin: '^_{4,}\\n',
|
||||
end: '\\n_{4,}$',
|
||||
relevance: 10
|
||||
},
|
||||
// listing and literal blocks
|
||||
{
|
||||
className: 'code',
|
||||
begin: '^[\\-\\.]{4,}\\n',
|
||||
end: '\\n[\\-\\.]{4,}$',
|
||||
relevance: 10
|
||||
},
|
||||
// passthrough blocks
|
||||
{
|
||||
begin: '^\\+{4,}\\n',
|
||||
end: '\\n\\+{4,}$',
|
||||
contains: [
|
||||
{
|
||||
begin: '<', end: '>',
|
||||
subLanguage: 'xml',
|
||||
relevance: 0
|
||||
}
|
||||
],
|
||||
relevance: 10
|
||||
},
|
||||
// lists (can only capture indicators)
|
||||
{
|
||||
className: 'bullet',
|
||||
begin: '^(\\*+|\\-+|\\.+|[^\\n]+?::)\\s+'
|
||||
},
|
||||
// admonition
|
||||
{
|
||||
className: 'symbol',
|
||||
begin: '^(NOTE|TIP|IMPORTANT|WARNING|CAUTION):\\s+',
|
||||
relevance: 10
|
||||
},
|
||||
// inline strong
|
||||
{
|
||||
className: 'strong',
|
||||
// must not follow a word character or be followed by an asterisk or space
|
||||
begin: '\\B\\*(?![\\*\\s])',
|
||||
end: '(\\n{2}|\\*)',
|
||||
// allow escaped asterisk followed by word char
|
||||
contains: [
|
||||
{
|
||||
begin: '\\\\*\\w',
|
||||
relevance: 0
|
||||
}
|
||||
]
|
||||
},
|
||||
// inline emphasis
|
||||
{
|
||||
className: 'emphasis',
|
||||
// must not follow a word character or be followed by a single quote or space
|
||||
begin: '\\B\'(?![\'\\s])',
|
||||
end: '(\\n{2}|\')',
|
||||
// allow escaped single quote followed by word char
|
||||
contains: [
|
||||
{
|
||||
begin: '\\\\\'\\w',
|
||||
relevance: 0
|
||||
}
|
||||
],
|
||||
relevance: 0
|
||||
},
|
||||
// inline emphasis (alt)
|
||||
{
|
||||
className: 'emphasis',
|
||||
// must not follow a word character or be followed by an underline or space
|
||||
begin: '_(?![_\\s])',
|
||||
end: '(\\n{2}|_)',
|
||||
relevance: 0
|
||||
},
|
||||
// inline smart quotes
|
||||
{
|
||||
className: 'string',
|
||||
variants: [
|
||||
{begin: "``.+?''"},
|
||||
{begin: "`.+?'"}
|
||||
]
|
||||
},
|
||||
// inline code snippets (TODO should get same treatment as strong and emphasis)
|
||||
{
|
||||
className: 'code',
|
||||
begin: '(`.+?`|\\+.+?\\+)',
|
||||
relevance: 0
|
||||
},
|
||||
// indented literal block
|
||||
{
|
||||
className: 'code',
|
||||
begin: '^[ \\t]',
|
||||
end: '$',
|
||||
relevance: 0
|
||||
},
|
||||
// horizontal rules
|
||||
{
|
||||
begin: '^\'{3,}[ \\t]*$',
|
||||
relevance: 10
|
||||
},
|
||||
// images and links
|
||||
{
|
||||
begin: '(link:)?(http|https|ftp|file|irc|image:?):\\S+\\[.*?\\]',
|
||||
returnBegin: true,
|
||||
contains: [
|
||||
{
|
||||
begin: '(link|image:?):',
|
||||
relevance: 0
|
||||
},
|
||||
{
|
||||
className: 'link',
|
||||
begin: '\\w',
|
||||
end: '[^\\[]+',
|
||||
relevance: 0
|
||||
},
|
||||
{
|
||||
className: 'string',
|
||||
begin: '\\[',
|
||||
end: '\\]',
|
||||
excludeBegin: true,
|
||||
excludeEnd: true,
|
||||
relevance: 0
|
||||
}
|
||||
],
|
||||
relevance: 10
|
||||
}
|
||||
]
|
||||
};
|
||||
};
|
144
src/assets/js/hightlight/languages/aspectj.js
Normal file
144
src/assets/js/hightlight/languages/aspectj.js
Normal file
@ -0,0 +1,144 @@
|
||||
module.exports = function (hljs) {
|
||||
var KEYWORDS =
|
||||
'false synchronized int abstract float private char boolean static null if const ' +
|
||||
'for true while long throw strictfp finally protected import native final return void ' +
|
||||
'enum else extends implements break transient new catch instanceof byte super volatile case ' +
|
||||
'assert short package default double public try this switch continue throws privileged ' +
|
||||
'aspectOf adviceexecution proceed cflowbelow cflow initialization preinitialization ' +
|
||||
'staticinitialization withincode target within execution getWithinTypeName handler ' +
|
||||
'thisJoinPoint thisJoinPointStaticPart thisEnclosingJoinPointStaticPart declare parents '+
|
||||
'warning error soft precedence thisAspectInstance';
|
||||
var SHORTKEYS = 'get set args call';
|
||||
return {
|
||||
keywords : KEYWORDS,
|
||||
illegal : /<\/|#/,
|
||||
contains : [
|
||||
hljs.COMMENT(
|
||||
'/\\*\\*',
|
||||
'\\*/',
|
||||
{
|
||||
relevance : 0,
|
||||
contains : [
|
||||
{
|
||||
// eat up @'s in emails to prevent them to be recognized as doctags
|
||||
begin: /\w+@/, relevance: 0
|
||||
},
|
||||
{
|
||||
className : 'doctag',
|
||||
begin : '@[A-Za-z]+'
|
||||
}
|
||||
]
|
||||
}
|
||||
),
|
||||
hljs.C_LINE_COMMENT_MODE,
|
||||
hljs.C_BLOCK_COMMENT_MODE,
|
||||
hljs.APOS_STRING_MODE,
|
||||
hljs.QUOTE_STRING_MODE,
|
||||
{
|
||||
className : 'class',
|
||||
beginKeywords : 'aspect',
|
||||
end : /[{;=]/,
|
||||
excludeEnd : true,
|
||||
illegal : /[:;"\[\]]/,
|
||||
contains : [
|
||||
{
|
||||
beginKeywords : 'extends implements pertypewithin perthis pertarget percflowbelow percflow issingleton'
|
||||
},
|
||||
hljs.UNDERSCORE_TITLE_MODE,
|
||||
{
|
||||
begin : /\([^\)]*/,
|
||||
end : /[)]+/,
|
||||
keywords : KEYWORDS + ' ' + SHORTKEYS,
|
||||
excludeEnd : false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
className : 'class',
|
||||
beginKeywords : 'class interface',
|
||||
end : /[{;=]/,
|
||||
excludeEnd : true,
|
||||
relevance: 0,
|
||||
keywords : 'class interface',
|
||||
illegal : /[:"\[\]]/,
|
||||
contains : [
|
||||
{beginKeywords : 'extends implements'},
|
||||
hljs.UNDERSCORE_TITLE_MODE
|
||||
]
|
||||
},
|
||||
{
|
||||
// AspectJ Constructs
|
||||
beginKeywords : 'pointcut after before around throwing returning',
|
||||
end : /[)]/,
|
||||
excludeEnd : false,
|
||||
illegal : /["\[\]]/,
|
||||
contains : [
|
||||
{
|
||||
begin : hljs.UNDERSCORE_IDENT_RE + '\\s*\\(',
|
||||
returnBegin : true,
|
||||
contains : [hljs.UNDERSCORE_TITLE_MODE]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
begin : /[:]/,
|
||||
returnBegin : true,
|
||||
end : /[{;]/,
|
||||
relevance: 0,
|
||||
excludeEnd : false,
|
||||
keywords : KEYWORDS,
|
||||
illegal : /["\[\]]/,
|
||||
contains : [
|
||||
{
|
||||
begin : hljs.UNDERSCORE_IDENT_RE + '\\s*\\(',
|
||||
keywords : KEYWORDS + ' ' + SHORTKEYS,
|
||||
relevance: 0
|
||||
},
|
||||
hljs.QUOTE_STRING_MODE
|
||||
]
|
||||
},
|
||||
{
|
||||
// this prevents 'new Name(...), or throw ...' from being recognized as a function definition
|
||||
beginKeywords : 'new throw',
|
||||
relevance : 0
|
||||
},
|
||||
{
|
||||
// the function class is a bit different for AspectJ compared to the Java language
|
||||
className : 'function',
|
||||
begin : /\w+ +\w+(\.)?\w+\s*\([^\)]*\)\s*((throws)[\w\s,]+)?[\{;]/,
|
||||
returnBegin : true,
|
||||
end : /[{;=]/,
|
||||
keywords : KEYWORDS,
|
||||
excludeEnd : true,
|
||||
contains : [
|
||||
{
|
||||
begin : hljs.UNDERSCORE_IDENT_RE + '\\s*\\(',
|
||||
returnBegin : true,
|
||||
relevance: 0,
|
||||
contains : [hljs.UNDERSCORE_TITLE_MODE]
|
||||
},
|
||||
{
|
||||
className : 'params',
|
||||
begin : /\(/, end : /\)/,
|
||||
relevance: 0,
|
||||
keywords : KEYWORDS,
|
||||
contains : [
|
||||
hljs.APOS_STRING_MODE,
|
||||
hljs.QUOTE_STRING_MODE,
|
||||
hljs.C_NUMBER_MODE,
|
||||
hljs.C_BLOCK_COMMENT_MODE
|
||||
]
|
||||
},
|
||||
hljs.C_LINE_COMMENT_MODE,
|
||||
hljs.C_BLOCK_COMMENT_MODE
|
||||
]
|
||||
},
|
||||
hljs.C_NUMBER_MODE,
|
||||
{
|
||||
// annotation is also used in this language
|
||||
className : 'meta',
|
||||
begin : '@[A-Za-z]+'
|
||||
}
|
||||
]
|
||||
};
|
||||
};
|
57
src/assets/js/hightlight/languages/autohotkey.js
Normal file
57
src/assets/js/hightlight/languages/autohotkey.js
Normal file
@ -0,0 +1,57 @@
|
||||
module.exports = function(hljs) {
|
||||
var BACKTICK_ESCAPE = {
|
||||
begin: '`[\\s\\S]'
|
||||
};
|
||||
|
||||
return {
|
||||
case_insensitive: true,
|
||||
aliases: [ 'ahk' ],
|
||||
keywords: {
|
||||
keyword: 'Break Continue Critical Exit ExitApp Gosub Goto New OnExit Pause return SetBatchLines SetTimer Suspend Thread Throw Until ahk_id ahk_class ahk_pid ahk_exe ahk_group',
|
||||
literal: 'true false NOT AND OR',
|
||||
built_in: 'ComSpec Clipboard ClipboardAll ErrorLevel',
|
||||
},
|
||||
contains: [
|
||||
BACKTICK_ESCAPE,
|
||||
hljs.inherit(hljs.QUOTE_STRING_MODE, {contains: [BACKTICK_ESCAPE]}),
|
||||
hljs.COMMENT(';', '$', {relevance: 0}),
|
||||
hljs.C_BLOCK_COMMENT_MODE,
|
||||
{
|
||||
className: 'number',
|
||||
begin: hljs.NUMBER_RE,
|
||||
relevance: 0
|
||||
},
|
||||
{
|
||||
className: 'variable', //subst would be the most accurate however fails the point of highlighting. variable is comparably the most accurate that actually has some effect
|
||||
begin: '%[a-zA-Z0-9#_$@]+%'
|
||||
},
|
||||
{
|
||||
className: 'built_in',
|
||||
begin: '^\\s*\\w+\\s*(,|%)'
|
||||
//I don't really know if this is totally relevant
|
||||
},
|
||||
{
|
||||
className: 'title', //symbol would be most accurate however is higlighted just like built_in and that makes up a lot of AutoHotkey code
|
||||
//meaning that it would fail to highlight anything
|
||||
variants: [
|
||||
{begin: '^[^\\n";]+::(?!=)'},
|
||||
{begin: '^[^\\n";]+:(?!=)', relevance: 0} // zero relevance as it catches a lot of things
|
||||
// followed by a single ':' in many languages
|
||||
]
|
||||
},
|
||||
{
|
||||
className: 'meta',
|
||||
begin: '^\\s*#\\w+', end:'$',
|
||||
relevance: 0
|
||||
},
|
||||
{
|
||||
className: 'built_in',
|
||||
begin: 'A_[a-zA-Z0-9]+'
|
||||
},
|
||||
{
|
||||
// consecutive commas, not for highlighting but just for relevance
|
||||
begin: ',\\s*,'
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
135
src/assets/js/hightlight/languages/autoit.js
Normal file
135
src/assets/js/hightlight/languages/autoit.js
Normal file
File diff suppressed because one or more lines are too long
61
src/assets/js/hightlight/languages/avrasm.js
Normal file
61
src/assets/js/hightlight/languages/avrasm.js
Normal file
@ -0,0 +1,61 @@
|
||||
module.exports = function(hljs) {
|
||||
return {
|
||||
case_insensitive: true,
|
||||
lexemes: '\\.?' + hljs.IDENT_RE,
|
||||
keywords: {
|
||||
keyword:
|
||||
/* mnemonic */
|
||||
'adc add adiw and andi asr bclr bld brbc brbs brcc brcs break breq brge brhc brhs ' +
|
||||
'brid brie brlo brlt brmi brne brpl brsh brtc brts brvc brvs bset bst call cbi cbr ' +
|
||||
'clc clh cli cln clr cls clt clv clz com cp cpc cpi cpse dec eicall eijmp elpm eor ' +
|
||||
'fmul fmuls fmulsu icall ijmp in inc jmp ld ldd ldi lds lpm lsl lsr mov movw mul ' +
|
||||
'muls mulsu neg nop or ori out pop push rcall ret reti rjmp rol ror sbc sbr sbrc sbrs ' +
|
||||
'sec seh sbi sbci sbic sbis sbiw sei sen ser ses set sev sez sleep spm st std sts sub ' +
|
||||
'subi swap tst wdr',
|
||||
built_in:
|
||||
/* general purpose registers */
|
||||
'r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 r16 r17 r18 r19 r20 r21 r22 ' +
|
||||
'r23 r24 r25 r26 r27 r28 r29 r30 r31 x|0 xh xl y|0 yh yl z|0 zh zl ' +
|
||||
/* IO Registers (ATMega128) */
|
||||
'ucsr1c udr1 ucsr1a ucsr1b ubrr1l ubrr1h ucsr0c ubrr0h tccr3c tccr3a tccr3b tcnt3h ' +
|
||||
'tcnt3l ocr3ah ocr3al ocr3bh ocr3bl ocr3ch ocr3cl icr3h icr3l etimsk etifr tccr1c ' +
|
||||
'ocr1ch ocr1cl twcr twdr twar twsr twbr osccal xmcra xmcrb eicra spmcsr spmcr portg ' +
|
||||
'ddrg ping portf ddrf sreg sph spl xdiv rampz eicrb eimsk gimsk gicr eifr gifr timsk ' +
|
||||
'tifr mcucr mcucsr tccr0 tcnt0 ocr0 assr tccr1a tccr1b tcnt1h tcnt1l ocr1ah ocr1al ' +
|
||||
'ocr1bh ocr1bl icr1h icr1l tccr2 tcnt2 ocr2 ocdr wdtcr sfior eearh eearl eedr eecr ' +
|
||||
'porta ddra pina portb ddrb pinb portc ddrc pinc portd ddrd pind spdr spsr spcr udr0 ' +
|
||||
'ucsr0a ucsr0b ubrr0l acsr admux adcsr adch adcl porte ddre pine pinf',
|
||||
meta:
|
||||
'.byte .cseg .db .def .device .dseg .dw .endmacro .equ .eseg .exit .include .list ' +
|
||||
'.listmac .macro .nolist .org .set'
|
||||
},
|
||||
contains: [
|
||||
hljs.C_BLOCK_COMMENT_MODE,
|
||||
hljs.COMMENT(
|
||||
';',
|
||||
'$',
|
||||
{
|
||||
relevance: 0
|
||||
}
|
||||
),
|
||||
hljs.C_NUMBER_MODE, // 0x..., decimal, float
|
||||
hljs.BINARY_NUMBER_MODE, // 0b...
|
||||
{
|
||||
className: 'number',
|
||||
begin: '\\b(\\$[a-zA-Z0-9]+|0o[0-7]+)' // $..., 0o...
|
||||
},
|
||||
hljs.QUOTE_STRING_MODE,
|
||||
{
|
||||
className: 'string',
|
||||
begin: '\'', end: '[^\\\\]\'',
|
||||
illegal: '[^\\\\][^\']'
|
||||
},
|
||||
{className: 'symbol', begin: '^[A-Za-z0-9_.$]+:'},
|
||||
{className: 'meta', begin: '#', end: '$'},
|
||||
{ // подстановка в «.macro»
|
||||
className: 'subst',
|
||||
begin: '@[0-9]+'
|
||||
}
|
||||
]
|
||||
};
|
||||
};
|
52
src/assets/js/hightlight/languages/awk.js
Normal file
52
src/assets/js/hightlight/languages/awk.js
Normal file
@ -0,0 +1,52 @@
|
||||
module.exports = function(hljs) {
|
||||
var VARIABLE = {
|
||||
className: 'variable',
|
||||
variants: [
|
||||
{begin: /\$[\w\d#@][\w\d_]*/},
|
||||
{begin: /\$\{(.*?)}/}
|
||||
]
|
||||
};
|
||||
var KEYWORDS = 'BEGIN END if else while do for in break continue delete next nextfile function func exit|10';
|
||||
var STRING = {
|
||||
className: 'string',
|
||||
contains: [hljs.BACKSLASH_ESCAPE],
|
||||
variants: [
|
||||
{
|
||||
begin: /(u|b)?r?'''/, end: /'''/,
|
||||
relevance: 10
|
||||
},
|
||||
{
|
||||
begin: /(u|b)?r?"""/, end: /"""/,
|
||||
relevance: 10
|
||||
},
|
||||
{
|
||||
begin: /(u|r|ur)'/, end: /'/,
|
||||
relevance: 10
|
||||
},
|
||||
{
|
||||
begin: /(u|r|ur)"/, end: /"/,
|
||||
relevance: 10
|
||||
},
|
||||
{
|
||||
begin: /(b|br)'/, end: /'/
|
||||
},
|
||||
{
|
||||
begin: /(b|br)"/, end: /"/
|
||||
},
|
||||
hljs.APOS_STRING_MODE,
|
||||
hljs.QUOTE_STRING_MODE
|
||||
]
|
||||
};
|
||||
return {
|
||||
keywords: {
|
||||
keyword: KEYWORDS
|
||||
},
|
||||
contains: [
|
||||
VARIABLE,
|
||||
STRING,
|
||||
hljs.REGEXP_MODE,
|
||||
hljs.HASH_COMMENT_MODE,
|
||||
hljs.NUMBER_MODE
|
||||
]
|
||||
}
|
||||
};
|
30
src/assets/js/hightlight/languages/axapta.js
Normal file
30
src/assets/js/hightlight/languages/axapta.js
Normal file
@ -0,0 +1,30 @@
|
||||
module.exports = function(hljs) {
|
||||
return {
|
||||
keywords: 'false int abstract private char boolean static null if for true ' +
|
||||
'while long throw finally protected final return void enum else ' +
|
||||
'break new catch byte super case short default double public try this switch ' +
|
||||
'continue reverse firstfast firstonly forupdate nofetch sum avg minof maxof count ' +
|
||||
'order group by asc desc index hint like dispaly edit client server ttsbegin ' +
|
||||
'ttscommit str real date container anytype common div mod',
|
||||
contains: [
|
||||
hljs.C_LINE_COMMENT_MODE,
|
||||
hljs.C_BLOCK_COMMENT_MODE,
|
||||
hljs.APOS_STRING_MODE,
|
||||
hljs.QUOTE_STRING_MODE,
|
||||
hljs.C_NUMBER_MODE,
|
||||
{
|
||||
className: 'meta',
|
||||
begin: '#', end: '$'
|
||||
},
|
||||
{
|
||||
className: 'class',
|
||||
beginKeywords: 'class interface', end: '{', excludeEnd: true,
|
||||
illegal: ':',
|
||||
contains: [
|
||||
{beginKeywords: 'extends implements'},
|
||||
hljs.UNDERSCORE_TITLE_MODE
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
};
|
80
src/assets/js/hightlight/languages/bash.js
Normal file
80
src/assets/js/hightlight/languages/bash.js
Normal file
@ -0,0 +1,80 @@
|
||||
module.exports = function(hljs) {
|
||||
var VAR = {
|
||||
className: 'variable',
|
||||
variants: [
|
||||
{begin: /\$[\w\d#@][\w\d_]*/},
|
||||
{begin: /\$\{(.*?)}/}
|
||||
]
|
||||
};
|
||||
var QUOTE_STRING = {
|
||||
className: 'string',
|
||||
begin: /"/, end: /"/,
|
||||
contains: [
|
||||
hljs.BACKSLASH_ESCAPE,
|
||||
VAR,
|
||||
{
|
||||
className: 'variable',
|
||||
begin: /\$\(/, end: /\)/,
|
||||
contains: [hljs.BACKSLASH_ESCAPE]
|
||||
}
|
||||
]
|
||||
};
|
||||
var ESCAPED_QUOTE = {
|
||||
className: '',
|
||||
begin: /\\"/
|
||||
|
||||
};
|
||||
var APOS_STRING = {
|
||||
className: 'string',
|
||||
begin: /'/, end: /'/
|
||||
};
|
||||
|
||||
return {
|
||||
aliases: ['sh', 'zsh'],
|
||||
lexemes: /\b-?[a-z\._]+\b/,
|
||||
keywords: {
|
||||
keyword:
|
||||
'if then else elif fi for while in do done case esac function',
|
||||
literal:
|
||||
'true false',
|
||||
built_in:
|
||||
// Shell built-ins
|
||||
// http://www.gnu.org/software/bash/manual/html_node/Shell-Builtin-Commands.html
|
||||
'break cd continue eval exec exit export getopts hash pwd readonly return shift test times ' +
|
||||
'trap umask unset ' +
|
||||
// Bash built-ins
|
||||
'alias bind builtin caller command declare echo enable help let local logout mapfile printf ' +
|
||||
'read readarray source type typeset ulimit unalias ' +
|
||||
// Shell modifiers
|
||||
'set shopt ' +
|
||||
// Zsh built-ins
|
||||
'autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles ' +
|
||||
'compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate ' +
|
||||
'fc fg float functions getcap getln history integer jobs kill limit log noglob popd print ' +
|
||||
'pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit ' +
|
||||
'unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof ' +
|
||||
'zpty zregexparse zsocket zstyle ztcp',
|
||||
_:
|
||||
'-ne -eq -lt -gt -f -d -e -s -l -a' // relevance booster
|
||||
},
|
||||
contains: [
|
||||
{
|
||||
className: 'meta',
|
||||
begin: /^#![^\n]+sh\s*$/,
|
||||
relevance: 10
|
||||
},
|
||||
{
|
||||
className: 'function',
|
||||
begin: /\w[\w\d_]*\s*\(\s*\)\s*\{/,
|
||||
returnBegin: true,
|
||||
contains: [hljs.inherit(hljs.TITLE_MODE, {begin: /\w[\w\d_]*/})],
|
||||
relevance: 0
|
||||
},
|
||||
hljs.HASH_COMMENT_MODE,
|
||||
QUOTE_STRING,
|
||||
ESCAPED_QUOTE,
|
||||
APOS_STRING,
|
||||
VAR
|
||||
]
|
||||
};
|
||||
};
|
50
src/assets/js/hightlight/languages/basic.js
Normal file
50
src/assets/js/hightlight/languages/basic.js
Normal file
@ -0,0 +1,50 @@
|
||||
module.exports = function(hljs) {
|
||||
return {
|
||||
case_insensitive: true,
|
||||
illegal: '^\.',
|
||||
// Support explicitely typed variables that end with $%! or #.
|
||||
lexemes: '[a-zA-Z][a-zA-Z0-9_\$\%\!\#]*',
|
||||
keywords: {
|
||||
keyword:
|
||||
'ABS ASC AND ATN AUTO|0 BEEP BLOAD|10 BSAVE|10 CALL CALLS CDBL CHAIN CHDIR CHR$|10 CINT CIRCLE ' +
|
||||
'CLEAR CLOSE CLS COLOR COM COMMON CONT COS CSNG CSRLIN CVD CVI CVS DATA DATE$ ' +
|
||||
'DEFDBL DEFINT DEFSNG DEFSTR DEF|0 SEG USR DELETE DIM DRAW EDIT END ENVIRON ENVIRON$ ' +
|
||||
'EOF EQV ERASE ERDEV ERDEV$ ERL ERR ERROR EXP FIELD FILES FIX FOR|0 FRE GET GOSUB|10 GOTO ' +
|
||||
'HEX$ IF|0 THEN ELSE|0 INKEY$ INP INPUT INPUT# INPUT$ INSTR IMP INT IOCTL IOCTL$ KEY ON ' +
|
||||
'OFF LIST KILL LEFT$ LEN LET LINE LLIST LOAD LOC LOCATE LOF LOG LPRINT USING LSET ' +
|
||||
'MERGE MID$ MKDIR MKD$ MKI$ MKS$ MOD NAME NEW NEXT NOISE NOT OCT$ ON OR PEN PLAY STRIG OPEN OPTION ' +
|
||||
'BASE OUT PAINT PALETTE PCOPY PEEK PMAP POINT POKE POS PRINT PRINT] PSET PRESET ' +
|
||||
'PUT RANDOMIZE READ REM RENUM RESET|0 RESTORE RESUME RETURN|0 RIGHT$ RMDIR RND RSET ' +
|
||||
'RUN SAVE SCREEN SGN SHELL SIN SOUND SPACE$ SPC SQR STEP STICK STOP STR$ STRING$ SWAP ' +
|
||||
'SYSTEM TAB TAN TIME$ TIMER TROFF TRON TO USR VAL VARPTR VARPTR$ VIEW WAIT WHILE ' +
|
||||
'WEND WIDTH WINDOW WRITE XOR'
|
||||
},
|
||||
contains: [
|
||||
hljs.QUOTE_STRING_MODE,
|
||||
hljs.COMMENT('REM', '$', {relevance: 10}),
|
||||
hljs.COMMENT('\'', '$', {relevance: 0}),
|
||||
{
|
||||
// Match line numbers
|
||||
className: 'symbol',
|
||||
begin: '^[0-9]+\ ',
|
||||
relevance: 10
|
||||
},
|
||||
{
|
||||
// Match typed numeric constants (1000, 12.34!, 1.2e5, 1.5#, 1.2D2)
|
||||
className: 'number',
|
||||
begin: '\\b([0-9]+[0-9edED\.]*[#\!]?)',
|
||||
relevance: 0
|
||||
},
|
||||
{
|
||||
// Match hexadecimal numbers (&Hxxxx)
|
||||
className: 'number',
|
||||
begin: '(\&[hH][0-9a-fA-F]{1,4})'
|
||||
},
|
||||
{
|
||||
// Match octal numbers (&Oxxxxxx)
|
||||
className: 'number',
|
||||
begin: '(\&[oO][0-7]{1,6})'
|
||||
}
|
||||
]
|
||||
};
|
||||
};
|
28
src/assets/js/hightlight/languages/bnf.js
Normal file
28
src/assets/js/hightlight/languages/bnf.js
Normal file
@ -0,0 +1,28 @@
|
||||
module.exports = function(hljs){
|
||||
return {
|
||||
contains: [
|
||||
// Attribute
|
||||
{
|
||||
className: 'attribute',
|
||||
begin: /</, end: />/
|
||||
},
|
||||
// Specific
|
||||
{
|
||||
begin: /::=/,
|
||||
starts: {
|
||||
end: /$/,
|
||||
contains: [
|
||||
{
|
||||
begin: /</, end: />/
|
||||
},
|
||||
// Common
|
||||
hljs.C_LINE_COMMENT_MODE,
|
||||
hljs.C_BLOCK_COMMENT_MODE,
|
||||
hljs.APOS_STRING_MODE,
|
||||
hljs.QUOTE_STRING_MODE
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
};
|
36
src/assets/js/hightlight/languages/brainfuck.js
Normal file
36
src/assets/js/hightlight/languages/brainfuck.js
Normal file
@ -0,0 +1,36 @@
|
||||
module.exports = function(hljs){
|
||||
var LITERAL = {
|
||||
className: 'literal',
|
||||
begin: '[\\+\\-]',
|
||||
relevance: 0
|
||||
};
|
||||
return {
|
||||
aliases: ['bf'],
|
||||
contains: [
|
||||
hljs.COMMENT(
|
||||
'[^\\[\\]\\.,\\+\\-<> \r\n]',
|
||||
'[\\[\\]\\.,\\+\\-<> \r\n]',
|
||||
{
|
||||
returnEnd: true,
|
||||
relevance: 0
|
||||
}
|
||||
),
|
||||
{
|
||||
className: 'title',
|
||||
begin: '[\\[\\]]',
|
||||
relevance: 0
|
||||
},
|
||||
{
|
||||
className: 'string',
|
||||
begin: '[\\.,]',
|
||||
relevance: 0
|
||||
},
|
||||
{
|
||||
// this mode works as the only relevance counter
|
||||
begin: /\+\+|\-\-/, returnBegin: true,
|
||||
contains: [LITERAL]
|
||||
},
|
||||
LITERAL
|
||||
]
|
||||
};
|
||||
};
|
79
src/assets/js/hightlight/languages/cal.js
Normal file
79
src/assets/js/hightlight/languages/cal.js
Normal file
@ -0,0 +1,79 @@
|
||||
module.exports = function(hljs) {
|
||||
var KEYWORDS =
|
||||
'div mod in and or not xor asserterror begin case do downto else end exit for if of repeat then to ' +
|
||||
'until while with var';
|
||||
var LITERALS = 'false true';
|
||||
var COMMENT_MODES = [
|
||||
hljs.C_LINE_COMMENT_MODE,
|
||||
hljs.COMMENT(
|
||||
/\{/,
|
||||
/\}/,
|
||||
{
|
||||
relevance: 0
|
||||
}
|
||||
),
|
||||
hljs.COMMENT(
|
||||
/\(\*/,
|
||||
/\*\)/,
|
||||
{
|
||||
relevance: 10
|
||||
}
|
||||
)
|
||||
];
|
||||
var STRING = {
|
||||
className: 'string',
|
||||
begin: /'/, end: /'/,
|
||||
contains: [{begin: /''/}]
|
||||
};
|
||||
var CHAR_STRING = {
|
||||
className: 'string', begin: /(#\d+)+/
|
||||
};
|
||||
var DATE = {
|
||||
className: 'number',
|
||||
begin: '\\b\\d+(\\.\\d+)?(DT|D|T)',
|
||||
relevance: 0
|
||||
};
|
||||
var DBL_QUOTED_VARIABLE = {
|
||||
className: 'string', // not a string technically but makes sense to be highlighted in the same style
|
||||
begin: '"',
|
||||
end: '"'
|
||||
};
|
||||
|
||||
var PROCEDURE = {
|
||||
className: 'function',
|
||||
beginKeywords: 'procedure', end: /[:;]/,
|
||||
keywords: 'procedure|10',
|
||||
contains: [
|
||||
hljs.TITLE_MODE,
|
||||
{
|
||||
className: 'params',
|
||||
begin: /\(/, end: /\)/,
|
||||
keywords: KEYWORDS,
|
||||
contains: [STRING, CHAR_STRING]
|
||||
}
|
||||
].concat(COMMENT_MODES)
|
||||
};
|
||||
|
||||
var OBJECT = {
|
||||
className: 'class',
|
||||
begin: 'OBJECT (Table|Form|Report|Dataport|Codeunit|XMLport|MenuSuite|Page|Query) (\\d+) ([^\\r\\n]+)',
|
||||
returnBegin: true,
|
||||
contains: [
|
||||
hljs.TITLE_MODE,
|
||||
PROCEDURE
|
||||
]
|
||||
};
|
||||
|
||||
return {
|
||||
case_insensitive: true,
|
||||
keywords: { keyword: KEYWORDS, literal: LITERALS },
|
||||
illegal: /\/\*/,
|
||||
contains: [
|
||||
STRING, CHAR_STRING,
|
||||
DATE, DBL_QUOTED_VARIABLE,
|
||||
hljs.NUMBER_MODE,
|
||||
OBJECT,
|
||||
PROCEDURE
|
||||
]
|
||||
};
|
||||
};
|
48
src/assets/js/hightlight/languages/capnproto.js
Normal file
48
src/assets/js/hightlight/languages/capnproto.js
Normal file
@ -0,0 +1,48 @@
|
||||
module.exports = function(hljs) {
|
||||
return {
|
||||
aliases: ['capnp'],
|
||||
keywords: {
|
||||
keyword:
|
||||
'struct enum interface union group import using const annotation extends in of on as with from fixed',
|
||||
built_in:
|
||||
'Void Bool Int8 Int16 Int32 Int64 UInt8 UInt16 UInt32 UInt64 Float32 Float64 ' +
|
||||
'Text Data AnyPointer AnyStruct Capability List',
|
||||
literal:
|
||||
'true false'
|
||||
},
|
||||
contains: [
|
||||
hljs.QUOTE_STRING_MODE,
|
||||
hljs.NUMBER_MODE,
|
||||
hljs.HASH_COMMENT_MODE,
|
||||
{
|
||||
className: 'meta',
|
||||
begin: /@0x[\w\d]{16};/,
|
||||
illegal: /\n/
|
||||
},
|
||||
{
|
||||
className: 'symbol',
|
||||
begin: /@\d+\b/
|
||||
},
|
||||
{
|
||||
className: 'class',
|
||||
beginKeywords: 'struct enum', end: /\{/,
|
||||
illegal: /\n/,
|
||||
contains: [
|
||||
hljs.inherit(hljs.TITLE_MODE, {
|
||||
starts: {endsWithParent: true, excludeEnd: true} // hack: eating everything after the first title
|
||||
})
|
||||
]
|
||||
},
|
||||
{
|
||||
className: 'class',
|
||||
beginKeywords: 'interface', end: /\{/,
|
||||
illegal: /\n/,
|
||||
contains: [
|
||||
hljs.inherit(hljs.TITLE_MODE, {
|
||||
starts: {endsWithParent: true, excludeEnd: true} // hack: eating everything after the first title
|
||||
})
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
};
|
66
src/assets/js/hightlight/languages/ceylon.js
Normal file
66
src/assets/js/hightlight/languages/ceylon.js
Normal file
@ -0,0 +1,66 @@
|
||||
module.exports = function(hljs) {
|
||||
// 2.3. Identifiers and keywords
|
||||
var KEYWORDS =
|
||||
'assembly module package import alias class interface object given value ' +
|
||||
'assign void function new of extends satisfies abstracts in out return ' +
|
||||
'break continue throw assert dynamic if else switch case for while try ' +
|
||||
'catch finally then let this outer super is exists nonempty';
|
||||
// 7.4.1 Declaration Modifiers
|
||||
var DECLARATION_MODIFIERS =
|
||||
'shared abstract formal default actual variable late native deprecated' +
|
||||
'final sealed annotation suppressWarnings small';
|
||||
// 7.4.2 Documentation
|
||||
var DOCUMENTATION =
|
||||
'doc by license see throws tagged';
|
||||
var SUBST = {
|
||||
className: 'subst', excludeBegin: true, excludeEnd: true,
|
||||
begin: /``/, end: /``/,
|
||||
keywords: KEYWORDS,
|
||||
relevance: 10
|
||||
};
|
||||
var EXPRESSIONS = [
|
||||
{
|
||||
// verbatim string
|
||||
className: 'string',
|
||||
begin: '"""',
|
||||
end: '"""',
|
||||
relevance: 10
|
||||
},
|
||||
{
|
||||
// string literal or template
|
||||
className: 'string',
|
||||
begin: '"', end: '"',
|
||||
contains: [SUBST]
|
||||
},
|
||||
{
|
||||
// character literal
|
||||
className: 'string',
|
||||
begin: "'",
|
||||
end: "'"
|
||||
},
|
||||
{
|
||||
// numeric literal
|
||||
className: 'number',
|
||||
begin: '#[0-9a-fA-F_]+|\\$[01_]+|[0-9_]+(?:\\.[0-9_](?:[eE][+-]?\\d+)?)?[kMGTPmunpf]?',
|
||||
relevance: 0
|
||||
}
|
||||
];
|
||||
SUBST.contains = EXPRESSIONS;
|
||||
|
||||
return {
|
||||
keywords: {
|
||||
keyword: KEYWORDS + ' ' + DECLARATION_MODIFIERS,
|
||||
meta: DOCUMENTATION
|
||||
},
|
||||
illegal: '\\$[^01]|#[^0-9a-fA-F]',
|
||||
contains: [
|
||||
hljs.C_LINE_COMMENT_MODE,
|
||||
hljs.COMMENT('/\\*', '\\*/', {contains: ['self']}),
|
||||
{
|
||||
// compiler annotation
|
||||
className: 'meta',
|
||||
begin: '@[a-z]\\w*(?:\\:\"[^\"]*\")?'
|
||||
}
|
||||
].concat(EXPRESSIONS)
|
||||
};
|
||||
};
|
26
src/assets/js/hightlight/languages/clean.js
Normal file
26
src/assets/js/hightlight/languages/clean.js
Normal file
@ -0,0 +1,26 @@
|
||||
module.exports = function(hljs) {
|
||||
return {
|
||||
aliases: ['clean','icl','dcl'],
|
||||
keywords: {
|
||||
keyword:
|
||||
'if let in with where case of class instance otherwise ' +
|
||||
'implementation definition system module from import qualified as ' +
|
||||
'special code inline foreign export ccall stdcall generic derive ' +
|
||||
'infix infixl infixr',
|
||||
built_in:
|
||||
'Int Real Char Bool',
|
||||
literal:
|
||||
'True False'
|
||||
},
|
||||
contains: [
|
||||
|
||||
hljs.C_LINE_COMMENT_MODE,
|
||||
hljs.C_BLOCK_COMMENT_MODE,
|
||||
hljs.APOS_STRING_MODE,
|
||||
hljs.QUOTE_STRING_MODE,
|
||||
hljs.C_NUMBER_MODE,
|
||||
|
||||
{begin: '->|<-[|:]?|#!?|>>=|\\{\\||\\|\\}|:==|=:|<>'} // relevance booster
|
||||
]
|
||||
};
|
||||
};
|
14
src/assets/js/hightlight/languages/clojure-repl.js
Normal file
14
src/assets/js/hightlight/languages/clojure-repl.js
Normal file
@ -0,0 +1,14 @@
|
||||
module.exports = function(hljs) {
|
||||
return {
|
||||
contains: [
|
||||
{
|
||||
className: 'meta',
|
||||
begin: /^([\w.-]+|\s*#_)?=>/,
|
||||
starts: {
|
||||
end: /$/,
|
||||
subLanguage: 'clojure'
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
95
src/assets/js/hightlight/languages/clojure.js
Normal file
95
src/assets/js/hightlight/languages/clojure.js
Normal file
@ -0,0 +1,95 @@
|
||||
module.exports = function(hljs) {
|
||||
var keywords = {
|
||||
'builtin-name':
|
||||
// Clojure keywords
|
||||
'def defonce cond apply if-not if-let if not not= = < > <= >= == + / * - rem '+
|
||||
'quot neg? pos? delay? symbol? keyword? true? false? integer? empty? coll? list? '+
|
||||
'set? ifn? fn? associative? sequential? sorted? counted? reversible? number? decimal? '+
|
||||
'class? distinct? isa? float? rational? reduced? ratio? odd? even? char? seq? vector? '+
|
||||
'string? map? nil? contains? zero? instance? not-every? not-any? libspec? -> ->> .. . '+
|
||||
'inc compare do dotimes mapcat take remove take-while drop letfn drop-last take-last '+
|
||||
'drop-while while intern condp case reduced cycle split-at split-with repeat replicate '+
|
||||
'iterate range merge zipmap declare line-seq sort comparator sort-by dorun doall nthnext '+
|
||||
'nthrest partition eval doseq await await-for let agent atom send send-off release-pending-sends '+
|
||||
'add-watch mapv filterv remove-watch agent-error restart-agent set-error-handler error-handler '+
|
||||
'set-error-mode! error-mode shutdown-agents quote var fn loop recur throw try monitor-enter '+
|
||||
'monitor-exit defmacro defn defn- macroexpand macroexpand-1 for dosync and or '+
|
||||
'when when-not when-let comp juxt partial sequence memoize constantly complement identity assert '+
|
||||
'peek pop doto proxy defstruct first rest cons defprotocol cast coll deftype defrecord last butlast '+
|
||||
'sigs reify second ffirst fnext nfirst nnext defmulti defmethod meta with-meta ns in-ns create-ns import '+
|
||||
'refer keys select-keys vals key val rseq name namespace promise into transient persistent! conj! '+
|
||||
'assoc! dissoc! pop! disj! use class type num float double short byte boolean bigint biginteger '+
|
||||
'bigdec print-method print-dup throw-if printf format load compile get-in update-in pr pr-on newline '+
|
||||
'flush read slurp read-line subvec with-open memfn time re-find re-groups rand-int rand mod locking '+
|
||||
'assert-valid-fdecl alias resolve ref deref refset swap! reset! set-validator! compare-and-set! alter-meta! '+
|
||||
'reset-meta! commute get-validator alter ref-set ref-history-count ref-min-history ref-max-history ensure sync io! '+
|
||||
'new next conj set! to-array future future-call into-array aset gen-class reduce map filter find empty '+
|
||||
'hash-map hash-set sorted-map sorted-map-by sorted-set sorted-set-by vec vector seq flatten reverse assoc dissoc list '+
|
||||
'disj get union difference intersection extend extend-type extend-protocol int nth delay count concat chunk chunk-buffer '+
|
||||
'chunk-append chunk-first chunk-rest max min dec unchecked-inc-int unchecked-inc unchecked-dec-inc unchecked-dec unchecked-negate '+
|
||||
'unchecked-add-int unchecked-add unchecked-subtract-int unchecked-subtract chunk-next chunk-cons chunked-seq? prn vary-meta '+
|
||||
'lazy-seq spread list* str find-keyword keyword symbol gensym force rationalize'
|
||||
};
|
||||
|
||||
var SYMBOLSTART = 'a-zA-Z_\\-!.?+*=<>&#\'';
|
||||
var SYMBOL_RE = '[' + SYMBOLSTART + '][' + SYMBOLSTART + '0-9/;:]*';
|
||||
var SIMPLE_NUMBER_RE = '[-+]?\\d+(\\.\\d+)?';
|
||||
|
||||
var SYMBOL = {
|
||||
begin: SYMBOL_RE,
|
||||
relevance: 0
|
||||
};
|
||||
var NUMBER = {
|
||||
className: 'number', begin: SIMPLE_NUMBER_RE,
|
||||
relevance: 0
|
||||
};
|
||||
var STRING = hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: null});
|
||||
var COMMENT = hljs.COMMENT(
|
||||
';',
|
||||
'$',
|
||||
{
|
||||
relevance: 0
|
||||
}
|
||||
);
|
||||
var LITERAL = {
|
||||
className: 'literal',
|
||||
begin: /\b(true|false|nil)\b/
|
||||
};
|
||||
var COLLECTION = {
|
||||
begin: '[\\[\\{]', end: '[\\]\\}]'
|
||||
};
|
||||
var HINT = {
|
||||
className: 'comment',
|
||||
begin: '\\^' + SYMBOL_RE
|
||||
};
|
||||
var HINT_COL = hljs.COMMENT('\\^\\{', '\\}');
|
||||
var KEY = {
|
||||
className: 'symbol',
|
||||
begin: '[:]{1,2}' + SYMBOL_RE
|
||||
};
|
||||
var LIST = {
|
||||
begin: '\\(', end: '\\)'
|
||||
};
|
||||
var BODY = {
|
||||
endsWithParent: true,
|
||||
relevance: 0
|
||||
};
|
||||
var NAME = {
|
||||
keywords: keywords,
|
||||
lexemes: SYMBOL_RE,
|
||||
className: 'name', begin: SYMBOL_RE,
|
||||
starts: BODY
|
||||
};
|
||||
var DEFAULT_CONTAINS = [LIST, STRING, HINT, HINT_COL, COMMENT, KEY, COLLECTION, NUMBER, LITERAL, SYMBOL];
|
||||
|
||||
LIST.contains = [hljs.COMMENT('comment', ''), NAME, BODY];
|
||||
BODY.contains = DEFAULT_CONTAINS;
|
||||
COLLECTION.contains = DEFAULT_CONTAINS;
|
||||
HINT_COL.contains = [COLLECTION];
|
||||
|
||||
return {
|
||||
aliases: ['clj'],
|
||||
illegal: /\S/,
|
||||
contains: [LIST, STRING, HINT, HINT_COL, COMMENT, KEY, COLLECTION, NUMBER, LITERAL]
|
||||
}
|
||||
};
|
52
src/assets/js/hightlight/languages/cmake.js
Normal file
52
src/assets/js/hightlight/languages/cmake.js
Normal file
@ -0,0 +1,52 @@
|
||||
module.exports = function(hljs) {
|
||||
return {
|
||||
aliases: ['cmake.in'],
|
||||
case_insensitive: true,
|
||||
keywords: {
|
||||
keyword:
|
||||
// scripting commands
|
||||
'break cmake_host_system_information cmake_minimum_required cmake_parse_arguments ' +
|
||||
'cmake_policy configure_file continue elseif else endforeach endfunction endif endmacro ' +
|
||||
'endwhile execute_process file find_file find_library find_package find_path ' +
|
||||
'find_program foreach function get_cmake_property get_directory_property ' +
|
||||
'get_filename_component get_property if include include_guard list macro ' +
|
||||
'mark_as_advanced math message option return separate_arguments ' +
|
||||
'set_directory_properties set_property set site_name string unset variable_watch while ' +
|
||||
// project commands
|
||||
'add_compile_definitions add_compile_options add_custom_command add_custom_target ' +
|
||||
'add_definitions add_dependencies add_executable add_library add_link_options ' +
|
||||
'add_subdirectory add_test aux_source_directory build_command create_test_sourcelist ' +
|
||||
'define_property enable_language enable_testing export fltk_wrap_ui ' +
|
||||
'get_source_file_property get_target_property get_test_property include_directories ' +
|
||||
'include_external_msproject include_regular_expression install link_directories ' +
|
||||
'link_libraries load_cache project qt_wrap_cpp qt_wrap_ui remove_definitions ' +
|
||||
'set_source_files_properties set_target_properties set_tests_properties source_group ' +
|
||||
'target_compile_definitions target_compile_features target_compile_options ' +
|
||||
'target_include_directories target_link_directories target_link_libraries ' +
|
||||
'target_link_options target_sources try_compile try_run ' +
|
||||
// CTest commands
|
||||
'ctest_build ctest_configure ctest_coverage ctest_empty_binary_directory ctest_memcheck ' +
|
||||
'ctest_read_custom_files ctest_run_script ctest_sleep ctest_start ctest_submit ' +
|
||||
'ctest_test ctest_update ctest_upload ' +
|
||||
// deprecated commands
|
||||
'build_name exec_program export_library_dependencies install_files install_programs ' +
|
||||
'install_targets load_command make_directory output_required_files remove ' +
|
||||
'subdir_depends subdirs use_mangled_mesa utility_source variable_requires write_file ' +
|
||||
'qt5_use_modules qt5_use_package qt5_wrap_cpp ' +
|
||||
// core keywords
|
||||
'on off true false and or not command policy target test exists is_newer_than ' +
|
||||
'is_directory is_symlink is_absolute matches less greater equal less_equal ' +
|
||||
'greater_equal strless strgreater strequal strless_equal strgreater_equal version_less ' +
|
||||
'version_greater version_equal version_less_equal version_greater_equal in_list defined'
|
||||
},
|
||||
contains: [
|
||||
{
|
||||
className: 'variable',
|
||||
begin: '\\${', end: '}'
|
||||
},
|
||||
hljs.HASH_COMMENT_MODE,
|
||||
hljs.QUOTE_STRING_MODE,
|
||||
hljs.NUMBER_MODE
|
||||
]
|
||||
};
|
||||
};
|
145
src/assets/js/hightlight/languages/coffeescript.js
Normal file
145
src/assets/js/hightlight/languages/coffeescript.js
Normal file
@ -0,0 +1,145 @@
|
||||
module.exports = function(hljs) {
|
||||
var KEYWORDS = {
|
||||
keyword:
|
||||
// JS keywords
|
||||
'in if for while finally new do return else break catch instanceof throw try this ' +
|
||||
'switch continue typeof delete debugger super yield import export from as default await ' +
|
||||
// Coffee keywords
|
||||
'then unless until loop of by when and or is isnt not',
|
||||
literal:
|
||||
// JS literals
|
||||
'true false null undefined ' +
|
||||
// Coffee literals
|
||||
'yes no on off',
|
||||
built_in:
|
||||
'npm require console print module global window document'
|
||||
};
|
||||
var JS_IDENT_RE = '[A-Za-z$_][0-9A-Za-z$_]*';
|
||||
var SUBST = {
|
||||
className: 'subst',
|
||||
begin: /#\{/, end: /}/,
|
||||
keywords: KEYWORDS
|
||||
};
|
||||
var EXPRESSIONS = [
|
||||
hljs.BINARY_NUMBER_MODE,
|
||||
hljs.inherit(hljs.C_NUMBER_MODE, {starts: {end: '(\\s*/)?', relevance: 0}}), // a number tries to eat the following slash to prevent treating it as a regexp
|
||||
{
|
||||
className: 'string',
|
||||
variants: [
|
||||
{
|
||||
begin: /'''/, end: /'''/,
|
||||
contains: [hljs.BACKSLASH_ESCAPE]
|
||||
},
|
||||
{
|
||||
begin: /'/, end: /'/,
|
||||
contains: [hljs.BACKSLASH_ESCAPE]
|
||||
},
|
||||
{
|
||||
begin: /"""/, end: /"""/,
|
||||
contains: [hljs.BACKSLASH_ESCAPE, SUBST]
|
||||
},
|
||||
{
|
||||
begin: /"/, end: /"/,
|
||||
contains: [hljs.BACKSLASH_ESCAPE, SUBST]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
className: 'regexp',
|
||||
variants: [
|
||||
{
|
||||
begin: '///', end: '///',
|
||||
contains: [SUBST, hljs.HASH_COMMENT_MODE]
|
||||
},
|
||||
{
|
||||
begin: '//[gim]*',
|
||||
relevance: 0
|
||||
},
|
||||
{
|
||||
// regex can't start with space to parse x / 2 / 3 as two divisions
|
||||
// regex can't start with *, and it supports an "illegal" in the main mode
|
||||
begin: /\/(?![ *])(\\\/|.)*?\/[gim]*(?=\W|$)/
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
begin: '@' + JS_IDENT_RE // relevance booster
|
||||
},
|
||||
{
|
||||
subLanguage: 'javascript',
|
||||
excludeBegin: true, excludeEnd: true,
|
||||
variants: [
|
||||
{
|
||||
begin: '```', end: '```',
|
||||
},
|
||||
{
|
||||
begin: '`', end: '`',
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
SUBST.contains = EXPRESSIONS;
|
||||
|
||||
var TITLE = hljs.inherit(hljs.TITLE_MODE, {begin: JS_IDENT_RE});
|
||||
var PARAMS_RE = '(\\(.*\\))?\\s*\\B[-=]>';
|
||||
var PARAMS = {
|
||||
className: 'params',
|
||||
begin: '\\([^\\(]', returnBegin: true,
|
||||
/* We need another contained nameless mode to not have every nested
|
||||
pair of parens to be called "params" */
|
||||
contains: [{
|
||||
begin: /\(/, end: /\)/,
|
||||
keywords: KEYWORDS,
|
||||
contains: ['self'].concat(EXPRESSIONS)
|
||||
}]
|
||||
};
|
||||
|
||||
return {
|
||||
aliases: ['coffee', 'cson', 'iced'],
|
||||
keywords: KEYWORDS,
|
||||
illegal: /\/\*/,
|
||||
contains: EXPRESSIONS.concat([
|
||||
hljs.COMMENT('###', '###'),
|
||||
hljs.HASH_COMMENT_MODE,
|
||||
{
|
||||
className: 'function',
|
||||
begin: '^\\s*' + JS_IDENT_RE + '\\s*=\\s*' + PARAMS_RE, end: '[-=]>',
|
||||
returnBegin: true,
|
||||
contains: [TITLE, PARAMS]
|
||||
},
|
||||
{
|
||||
// anonymous function start
|
||||
begin: /[:\(,=]\s*/,
|
||||
relevance: 0,
|
||||
contains: [
|
||||
{
|
||||
className: 'function',
|
||||
begin: PARAMS_RE, end: '[-=]>',
|
||||
returnBegin: true,
|
||||
contains: [PARAMS]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
className: 'class',
|
||||
beginKeywords: 'class',
|
||||
end: '$',
|
||||
illegal: /[:="\[\]]/,
|
||||
contains: [
|
||||
{
|
||||
beginKeywords: 'extends',
|
||||
endsWithParent: true,
|
||||
illegal: /[:="\[\]]/,
|
||||
contains: [TITLE]
|
||||
},
|
||||
TITLE
|
||||
]
|
||||
},
|
||||
{
|
||||
begin: JS_IDENT_RE + ':', end: ':',
|
||||
returnBegin: true, returnEnd: true,
|
||||
relevance: 0
|
||||
}
|
||||
])
|
||||
};
|
||||
};
|
66
src/assets/js/hightlight/languages/coq.js
Normal file
66
src/assets/js/hightlight/languages/coq.js
Normal file
@ -0,0 +1,66 @@
|
||||
module.exports = function(hljs) {
|
||||
return {
|
||||
keywords: {
|
||||
keyword:
|
||||
'_ as at cofix else end exists exists2 fix for forall fun if IF in let ' +
|
||||
'match mod Prop return Set then Type using where with ' +
|
||||
'Abort About Add Admit Admitted All Arguments Assumptions Axiom Back BackTo ' +
|
||||
'Backtrack Bind Blacklist Canonical Cd Check Class Classes Close Coercion ' +
|
||||
'Coercions CoFixpoint CoInductive Collection Combined Compute Conjecture ' +
|
||||
'Conjectures Constant constr Constraint Constructors Context Corollary ' +
|
||||
'CreateHintDb Cut Declare Defined Definition Delimit Dependencies Dependent' +
|
||||
'Derive Drop eauto End Equality Eval Example Existential Existentials ' +
|
||||
'Existing Export exporting Extern Extract Extraction Fact Field Fields File ' +
|
||||
'Fixpoint Focus for From Function Functional Generalizable Global Goal Grab ' +
|
||||
'Grammar Graph Guarded Heap Hint HintDb Hints Hypotheses Hypothesis ident ' +
|
||||
'Identity If Immediate Implicit Import Include Inductive Infix Info Initial ' +
|
||||
'Inline Inspect Instance Instances Intro Intros Inversion Inversion_clear ' +
|
||||
'Language Left Lemma Let Libraries Library Load LoadPath Local Locate Ltac ML ' +
|
||||
'Mode Module Modules Monomorphic Morphism Next NoInline Notation Obligation ' +
|
||||
'Obligations Opaque Open Optimize Options Parameter Parameters Parametric ' +
|
||||
'Path Paths pattern Polymorphic Preterm Print Printing Program Projections ' +
|
||||
'Proof Proposition Pwd Qed Quit Rec Record Recursive Redirect Relation Remark ' +
|
||||
'Remove Require Reserved Reset Resolve Restart Rewrite Right Ring Rings Save ' +
|
||||
'Scheme Scope Scopes Script Search SearchAbout SearchHead SearchPattern ' +
|
||||
'SearchRewrite Section Separate Set Setoid Show Solve Sorted Step Strategies ' +
|
||||
'Strategy Structure SubClass Table Tables Tactic Term Test Theorem Time ' +
|
||||
'Timeout Transparent Type Typeclasses Types Undelimit Undo Unfocus Unfocused ' +
|
||||
'Unfold Universe Universes Unset Unshelve using Variable Variables Variant ' +
|
||||
'Verbose Visibility where with',
|
||||
built_in:
|
||||
'abstract absurd admit after apply as assert assumption at auto autorewrite ' +
|
||||
'autounfold before bottom btauto by case case_eq cbn cbv change ' +
|
||||
'classical_left classical_right clear clearbody cofix compare compute ' +
|
||||
'congruence constr_eq constructor contradict contradiction cut cutrewrite ' +
|
||||
'cycle decide decompose dependent destruct destruction dintuition ' +
|
||||
'discriminate discrR do double dtauto eapply eassumption eauto ecase ' +
|
||||
'econstructor edestruct ediscriminate eelim eexact eexists einduction ' +
|
||||
'einjection eleft elim elimtype enough equality erewrite eright ' +
|
||||
'esimplify_eq esplit evar exact exactly_once exfalso exists f_equal fail ' +
|
||||
'field field_simplify field_simplify_eq first firstorder fix fold fourier ' +
|
||||
'functional generalize generalizing gfail give_up has_evar hnf idtac in ' +
|
||||
'induction injection instantiate intro intro_pattern intros intuition ' +
|
||||
'inversion inversion_clear is_evar is_var lapply lazy left lia lra move ' +
|
||||
'native_compute nia nsatz omega once pattern pose progress proof psatz quote ' +
|
||||
'record red refine reflexivity remember rename repeat replace revert ' +
|
||||
'revgoals rewrite rewrite_strat right ring ring_simplify rtauto set ' +
|
||||
'setoid_reflexivity setoid_replace setoid_rewrite setoid_symmetry ' +
|
||||
'setoid_transitivity shelve shelve_unifiable simpl simple simplify_eq solve ' +
|
||||
'specialize split split_Rabs split_Rmult stepl stepr subst sum swap ' +
|
||||
'symmetry tactic tauto time timeout top transitivity trivial try tryif ' +
|
||||
'unfold unify until using vm_compute with'
|
||||
},
|
||||
contains: [
|
||||
hljs.QUOTE_STRING_MODE,
|
||||
hljs.COMMENT('\\(\\*', '\\*\\)'),
|
||||
hljs.C_NUMBER_MODE,
|
||||
{
|
||||
className: 'type',
|
||||
excludeBegin: true,
|
||||
begin: '\\|\\s*',
|
||||
end: '\\w+'
|
||||
},
|
||||
{begin: /[-=]>/} // relevance booster
|
||||
]
|
||||
};
|
||||
};
|
123
src/assets/js/hightlight/languages/cos.js
Normal file
123
src/assets/js/hightlight/languages/cos.js
Normal file
@ -0,0 +1,123 @@
|
||||
module.exports = function cos (hljs) {
|
||||
|
||||
var STRINGS = {
|
||||
className: 'string',
|
||||
variants: [
|
||||
{
|
||||
begin: '"',
|
||||
end: '"',
|
||||
contains: [{ // escaped
|
||||
begin: "\"\"",
|
||||
relevance: 0
|
||||
}]
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
var NUMBERS = {
|
||||
className: "number",
|
||||
begin: "\\b(\\d+(\\.\\d*)?|\\.\\d+)",
|
||||
relevance: 0
|
||||
};
|
||||
|
||||
var COS_KEYWORDS =
|
||||
'property parameter class classmethod clientmethod extends as break ' +
|
||||
'catch close continue do d|0 else elseif for goto halt hang h|0 if job ' +
|
||||
'j|0 kill k|0 lock l|0 merge new open quit q|0 read r|0 return set s|0 ' +
|
||||
'tcommit throw trollback try tstart use view while write w|0 xecute x|0 ' +
|
||||
'zkill znspace zn ztrap zwrite zw zzdump zzwrite print zbreak zinsert ' +
|
||||
'zload zprint zremove zsave zzprint mv mvcall mvcrt mvdim mvprint zquit ' +
|
||||
'zsync ascii';
|
||||
|
||||
// registered function - no need in them due to all functions are highlighted,
|
||||
// but I'll just leave this here.
|
||||
|
||||
//"$bit", "$bitcount",
|
||||
//"$bitfind", "$bitlogic", "$case", "$char", "$classmethod", "$classname",
|
||||
//"$compile", "$data", "$decimal", "$double", "$extract", "$factor",
|
||||
//"$find", "$fnumber", "$get", "$increment", "$inumber", "$isobject",
|
||||
//"$isvaliddouble", "$isvalidnum", "$justify", "$length", "$list",
|
||||
//"$listbuild", "$listdata", "$listfind", "$listfromstring", "$listget",
|
||||
//"$listlength", "$listnext", "$listsame", "$listtostring", "$listvalid",
|
||||
//"$locate", "$match", "$method", "$name", "$nconvert", "$next",
|
||||
//"$normalize", "$now", "$number", "$order", "$parameter", "$piece",
|
||||
//"$prefetchoff", "$prefetchon", "$property", "$qlength", "$qsubscript",
|
||||
//"$query", "$random", "$replace", "$reverse", "$sconvert", "$select",
|
||||
//"$sortbegin", "$sortend", "$stack", "$text", "$translate", "$view",
|
||||
//"$wascii", "$wchar", "$wextract", "$wfind", "$wiswide", "$wlength",
|
||||
//"$wreverse", "$xecute", "$zabs", "$zarccos", "$zarcsin", "$zarctan",
|
||||
//"$zcos", "$zcot", "$zcsc", "$zdate", "$zdateh", "$zdatetime",
|
||||
//"$zdatetimeh", "$zexp", "$zhex", "$zln", "$zlog", "$zpower", "$zsec",
|
||||
//"$zsin", "$zsqr", "$ztan", "$ztime", "$ztimeh", "$zboolean",
|
||||
//"$zconvert", "$zcrc", "$zcyc", "$zdascii", "$zdchar", "$zf",
|
||||
//"$ziswide", "$zlascii", "$zlchar", "$zname", "$zposition", "$zqascii",
|
||||
//"$zqchar", "$zsearch", "$zseek", "$zstrip", "$zwascii", "$zwchar",
|
||||
//"$zwidth", "$zwpack", "$zwbpack", "$zwunpack", "$zwbunpack", "$zzenkaku",
|
||||
//"$change", "$mv", "$mvat", "$mvfmt", "$mvfmts", "$mviconv",
|
||||
//"$mviconvs", "$mvinmat", "$mvlover", "$mvoconv", "$mvoconvs", "$mvraise",
|
||||
//"$mvtrans", "$mvv", "$mvname", "$zbitand", "$zbitcount", "$zbitfind",
|
||||
//"$zbitget", "$zbitlen", "$zbitnot", "$zbitor", "$zbitset", "$zbitstr",
|
||||
//"$zbitxor", "$zincrement", "$znext", "$zorder", "$zprevious", "$zsort",
|
||||
//"device", "$ecode", "$estack", "$etrap", "$halt", "$horolog",
|
||||
//"$io", "$job", "$key", "$namespace", "$principal", "$quit", "$roles",
|
||||
//"$storage", "$system", "$test", "$this", "$tlevel", "$username",
|
||||
//"$x", "$y", "$za", "$zb", "$zchild", "$zeof", "$zeos", "$zerror",
|
||||
//"$zhorolog", "$zio", "$zjob", "$zmode", "$znspace", "$zparent", "$zpi",
|
||||
//"$zpos", "$zreference", "$zstorage", "$ztimestamp", "$ztimezone",
|
||||
//"$ztrap", "$zversion"
|
||||
|
||||
return {
|
||||
case_insensitive: true,
|
||||
aliases: ["cos", "cls"],
|
||||
keywords: COS_KEYWORDS,
|
||||
contains: [
|
||||
NUMBERS,
|
||||
STRINGS,
|
||||
hljs.C_LINE_COMMENT_MODE,
|
||||
hljs.C_BLOCK_COMMENT_MODE,
|
||||
{
|
||||
className: "comment",
|
||||
begin: /;/, end: "$",
|
||||
relevance: 0
|
||||
},
|
||||
{ // Functions and user-defined functions: write $ztime(60*60*3), $$myFunc(10), $$^Val(1)
|
||||
className: "built_in",
|
||||
begin: /(?:\$\$?|\.\.)\^?[a-zA-Z]+/
|
||||
},
|
||||
{ // Macro command: quit $$$OK
|
||||
className: "built_in",
|
||||
begin: /\$\$\$[a-zA-Z]+/
|
||||
},
|
||||
{ // Special (global) variables: write %request.Content; Built-in classes: %Library.Integer
|
||||
className: "built_in",
|
||||
begin: /%[a-z]+(?:\.[a-z]+)*/
|
||||
},
|
||||
{ // Global variable: set ^globalName = 12 write ^globalName
|
||||
className: "symbol",
|
||||
begin: /\^%?[a-zA-Z][\w]*/
|
||||
},
|
||||
{ // Some control constructions: do ##class(Package.ClassName).Method(), ##super()
|
||||
className: "keyword",
|
||||
begin: /##class|##super|#define|#dim/
|
||||
},
|
||||
|
||||
// sub-languages: are not fully supported by hljs by 11/15/2015
|
||||
// left for the future implementation.
|
||||
{
|
||||
begin: /&sql\(/, end: /\)/,
|
||||
excludeBegin: true, excludeEnd: true,
|
||||
subLanguage: "sql"
|
||||
},
|
||||
{
|
||||
begin: /&(js|jscript|javascript)</, end: />/,
|
||||
excludeBegin: true, excludeEnd: true,
|
||||
subLanguage: "javascript"
|
||||
},
|
||||
{
|
||||
// this brakes first and last tag, but this is the only way to embed a valid html
|
||||
begin: /&html<\s*</, end: />\s*>/,
|
||||
subLanguage: "xml"
|
||||
}
|
||||
]
|
||||
};
|
||||
};
|
185
src/assets/js/hightlight/languages/cpp.js
Normal file
185
src/assets/js/hightlight/languages/cpp.js
Normal file
@ -0,0 +1,185 @@
|
||||
module.exports = function(hljs) {
|
||||
var CPP_PRIMITIVE_TYPES = {
|
||||
className: 'keyword',
|
||||
begin: '\\b[a-z\\d_]*_t\\b'
|
||||
};
|
||||
|
||||
var STRINGS = {
|
||||
className: 'string',
|
||||
variants: [
|
||||
{
|
||||
begin: '(u8?|U|L)?"', end: '"',
|
||||
illegal: '\\n',
|
||||
contains: [hljs.BACKSLASH_ESCAPE]
|
||||
},
|
||||
{ begin: /(?:u8?|U|L)?R"([^()\\ ]{0,16})\((?:.|\n)*?\)\1"/ },
|
||||
{
|
||||
begin: '\'\\\\?.', end: '\'',
|
||||
illegal: '.'
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
var NUMBERS = {
|
||||
className: 'number',
|
||||
variants: [
|
||||
{ begin: '\\b(0b[01\']+)' },
|
||||
{ begin: '(-?)\\b([\\d\']+(\\.[\\d\']*)?|\\.[\\d\']+)(u|U|l|L|ul|UL|f|F|b|B)' },
|
||||
{ begin: '(-?)(\\b0[xX][a-fA-F0-9\']+|(\\b[\\d\']+(\\.[\\d\']*)?|\\.[\\d\']+)([eE][-+]?[\\d\']+)?)' }
|
||||
],
|
||||
relevance: 0
|
||||
};
|
||||
|
||||
var PREPROCESSOR = {
|
||||
className: 'meta',
|
||||
begin: /#\s*[a-z]+\b/, end: /$/,
|
||||
keywords: {
|
||||
'meta-keyword':
|
||||
'if else elif endif define undef warning error line ' +
|
||||
'pragma ifdef ifndef include'
|
||||
},
|
||||
contains: [
|
||||
{
|
||||
begin: /\\\n/, relevance: 0
|
||||
},
|
||||
hljs.inherit(STRINGS, {className: 'meta-string'}),
|
||||
{
|
||||
className: 'meta-string',
|
||||
begin: /<[^\n>]*>/, end: /$/,
|
||||
illegal: '\\n',
|
||||
},
|
||||
hljs.C_LINE_COMMENT_MODE,
|
||||
hljs.C_BLOCK_COMMENT_MODE
|
||||
]
|
||||
};
|
||||
|
||||
var FUNCTION_TITLE = hljs.IDENT_RE + '\\s*\\(';
|
||||
|
||||
var CPP_KEYWORDS = {
|
||||
keyword: 'int float while private char catch import module export virtual operator sizeof ' +
|
||||
'dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace ' +
|
||||
'unsigned long volatile static protected bool template mutable if public friend ' +
|
||||
'do goto auto void enum else break extern using asm case typeid ' +
|
||||
'short reinterpret_cast|10 default double register explicit signed typename try this ' +
|
||||
'switch continue inline delete alignof constexpr decltype ' +
|
||||
'noexcept static_assert thread_local restrict _Bool complex _Complex _Imaginary ' +
|
||||
'atomic_bool atomic_char atomic_schar ' +
|
||||
'atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong ' +
|
||||
'atomic_ullong new throw return ' +
|
||||
'and or not',
|
||||
built_in: 'std string cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream ' +
|
||||
'auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set ' +
|
||||
'unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos ' +
|
||||
'asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp ' +
|
||||
'fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper ' +
|
||||
'isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow ' +
|
||||
'printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp ' +
|
||||
'strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan ' +
|
||||
'vfprintf vprintf vsprintf endl initializer_list unique_ptr',
|
||||
literal: 'true false nullptr NULL'
|
||||
};
|
||||
|
||||
var EXPRESSION_CONTAINS = [
|
||||
CPP_PRIMITIVE_TYPES,
|
||||
hljs.C_LINE_COMMENT_MODE,
|
||||
hljs.C_BLOCK_COMMENT_MODE,
|
||||
NUMBERS,
|
||||
STRINGS
|
||||
];
|
||||
|
||||
return {
|
||||
aliases: ['c', 'cc', 'h', 'c++', 'h++', 'hpp', 'hh', 'hxx', 'cxx'],
|
||||
keywords: CPP_KEYWORDS,
|
||||
illegal: '</',
|
||||
contains: EXPRESSION_CONTAINS.concat([
|
||||
PREPROCESSOR,
|
||||
{
|
||||
begin: '\\b(deque|list|queue|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<', end: '>',
|
||||
keywords: CPP_KEYWORDS,
|
||||
contains: ['self', CPP_PRIMITIVE_TYPES]
|
||||
},
|
||||
{
|
||||
begin: hljs.IDENT_RE + '::',
|
||||
keywords: CPP_KEYWORDS
|
||||
},
|
||||
{
|
||||
// This mode covers expression context where we can't expect a function
|
||||
// definition and shouldn't highlight anything that looks like one:
|
||||
// `return some()`, `else if()`, `(x*sum(1, 2))`
|
||||
variants: [
|
||||
{begin: /=/, end: /;/},
|
||||
{begin: /\(/, end: /\)/},
|
||||
{beginKeywords: 'new throw return else', end: /;/}
|
||||
],
|
||||
keywords: CPP_KEYWORDS,
|
||||
contains: EXPRESSION_CONTAINS.concat([
|
||||
{
|
||||
begin: /\(/, end: /\)/,
|
||||
keywords: CPP_KEYWORDS,
|
||||
contains: EXPRESSION_CONTAINS.concat(['self']),
|
||||
relevance: 0
|
||||
}
|
||||
]),
|
||||
relevance: 0
|
||||
},
|
||||
{
|
||||
className: 'function',
|
||||
begin: '(' + hljs.IDENT_RE + '[\\*&\\s]+)+' + FUNCTION_TITLE,
|
||||
returnBegin: true, end: /[{;=]/,
|
||||
excludeEnd: true,
|
||||
keywords: CPP_KEYWORDS,
|
||||
illegal: /[^\w\s\*&]/,
|
||||
contains: [
|
||||
{
|
||||
begin: FUNCTION_TITLE, returnBegin: true,
|
||||
contains: [hljs.TITLE_MODE],
|
||||
relevance: 0
|
||||
},
|
||||
{
|
||||
className: 'params',
|
||||
begin: /\(/, end: /\)/,
|
||||
keywords: CPP_KEYWORDS,
|
||||
relevance: 0,
|
||||
contains: [
|
||||
hljs.C_LINE_COMMENT_MODE,
|
||||
hljs.C_BLOCK_COMMENT_MODE,
|
||||
STRINGS,
|
||||
NUMBERS,
|
||||
CPP_PRIMITIVE_TYPES,
|
||||
// Count matching parentheses.
|
||||
{
|
||||
begin: /\(/, end: /\)/,
|
||||
keywords: CPP_KEYWORDS,
|
||||
relevance: 0,
|
||||
contains: [
|
||||
'self',
|
||||
hljs.C_LINE_COMMENT_MODE,
|
||||
hljs.C_BLOCK_COMMENT_MODE,
|
||||
STRINGS,
|
||||
NUMBERS,
|
||||
CPP_PRIMITIVE_TYPES
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
hljs.C_LINE_COMMENT_MODE,
|
||||
hljs.C_BLOCK_COMMENT_MODE,
|
||||
PREPROCESSOR
|
||||
]
|
||||
},
|
||||
{
|
||||
className: 'class',
|
||||
beginKeywords: 'class struct', end: /[{;:]/,
|
||||
contains: [
|
||||
{begin: /</, end: />/, contains: ['self']}, // skip generic stuff
|
||||
hljs.TITLE_MODE
|
||||
]
|
||||
}
|
||||
]),
|
||||
exports: {
|
||||
preprocessor: PREPROCESSOR,
|
||||
strings: STRINGS,
|
||||
keywords: CPP_KEYWORDS
|
||||
}
|
||||
};
|
||||
};
|
93
src/assets/js/hightlight/languages/crmsh.js
Normal file
93
src/assets/js/hightlight/languages/crmsh.js
Normal file
@ -0,0 +1,93 @@
|
||||
module.exports = function(hljs) {
|
||||
var RESOURCES = 'primitive rsc_template';
|
||||
|
||||
var COMMANDS = 'group clone ms master location colocation order fencing_topology ' +
|
||||
'rsc_ticket acl_target acl_group user role ' +
|
||||
'tag xml';
|
||||
|
||||
var PROPERTY_SETS = 'property rsc_defaults op_defaults';
|
||||
|
||||
var KEYWORDS = 'params meta operations op rule attributes utilization';
|
||||
|
||||
var OPERATORS = 'read write deny defined not_defined in_range date spec in ' +
|
||||
'ref reference attribute type xpath version and or lt gt tag ' +
|
||||
'lte gte eq ne \\';
|
||||
|
||||
var TYPES = 'number string';
|
||||
|
||||
var LITERALS = 'Master Started Slave Stopped start promote demote stop monitor true false';
|
||||
|
||||
return {
|
||||
aliases: ['crm', 'pcmk'],
|
||||
case_insensitive: true,
|
||||
keywords: {
|
||||
keyword: KEYWORDS + ' ' + OPERATORS + ' ' + TYPES,
|
||||
literal: LITERALS
|
||||
},
|
||||
contains: [
|
||||
hljs.HASH_COMMENT_MODE,
|
||||
{
|
||||
beginKeywords: 'node',
|
||||
starts: {
|
||||
end: '\\s*([\\w_-]+:)?',
|
||||
starts: {
|
||||
className: 'title',
|
||||
end: '\\s*[\\$\\w_][\\w_-]*'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
beginKeywords: RESOURCES,
|
||||
starts: {
|
||||
className: 'title',
|
||||
end: '\\s*[\\$\\w_][\\w_-]*',
|
||||
starts: {
|
||||
end: '\\s*@?[\\w_][\\w_\\.:-]*'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
begin: '\\b(' + COMMANDS.split(' ').join('|') + ')\\s+',
|
||||
keywords: COMMANDS,
|
||||
starts: {
|
||||
className: 'title',
|
||||
end: '[\\$\\w_][\\w_-]*'
|
||||
}
|
||||
},
|
||||
{
|
||||
beginKeywords: PROPERTY_SETS,
|
||||
starts: {
|
||||
className: 'title',
|
||||
end: '\\s*([\\w_-]+:)?'
|
||||
}
|
||||
},
|
||||
hljs.QUOTE_STRING_MODE,
|
||||
{
|
||||
className: 'meta',
|
||||
begin: '(ocf|systemd|service|lsb):[\\w_:-]+',
|
||||
relevance: 0
|
||||
},
|
||||
{
|
||||
className: 'number',
|
||||
begin: '\\b\\d+(\\.\\d+)?(ms|s|h|m)?',
|
||||
relevance: 0
|
||||
},
|
||||
{
|
||||
className: 'literal',
|
||||
begin: '[-]?(infinity|inf)',
|
||||
relevance: 0
|
||||
},
|
||||
{
|
||||
className: 'attr',
|
||||
begin: /([A-Za-z\$_\#][\w_-]+)=/,
|
||||
relevance: 0
|
||||
},
|
||||
{
|
||||
className: 'tag',
|
||||
begin: '</?',
|
||||
end: '/?>',
|
||||
relevance: 0
|
||||
}
|
||||
]
|
||||
};
|
||||
};
|
187
src/assets/js/hightlight/languages/crystal.js
Normal file
187
src/assets/js/hightlight/languages/crystal.js
Normal file
@ -0,0 +1,187 @@
|
||||
module.exports = function(hljs) {
|
||||
var INT_SUFFIX = '(_*[ui](8|16|32|64|128))?';
|
||||
var FLOAT_SUFFIX = '(_*f(32|64))?';
|
||||
var CRYSTAL_IDENT_RE = '[a-zA-Z_]\\w*[!?=]?';
|
||||
var CRYSTAL_METHOD_RE = '[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~|]|//|//=|&[-+*]=?|&\\*\\*|\\[\\][=?]?';
|
||||
var CRYSTAL_PATH_RE = '[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?';
|
||||
var CRYSTAL_KEYWORDS = {
|
||||
keyword:
|
||||
'abstract alias annotation as as? asm begin break case class def do else elsif end ensure enum extend for fun if ' +
|
||||
'include instance_sizeof is_a? lib macro module next nil? of out pointerof private protected rescue responds_to? ' +
|
||||
'return require select self sizeof struct super then type typeof union uninitialized unless until verbatim when while with yield ' +
|
||||
'__DIR__ __END_LINE__ __FILE__ __LINE__',
|
||||
literal: 'false nil true'
|
||||
};
|
||||
var SUBST = {
|
||||
className: 'subst',
|
||||
begin: '#{', end: '}',
|
||||
keywords: CRYSTAL_KEYWORDS
|
||||
};
|
||||
var EXPANSION = {
|
||||
className: 'template-variable',
|
||||
variants: [
|
||||
{begin: '\\{\\{', end: '\\}\\}'},
|
||||
{begin: '\\{%', end: '%\\}'}
|
||||
],
|
||||
keywords: CRYSTAL_KEYWORDS
|
||||
};
|
||||
|
||||
function recursiveParen(begin, end) {
|
||||
var
|
||||
contains = [{begin: begin, end: end}];
|
||||
contains[0].contains = contains;
|
||||
return contains;
|
||||
}
|
||||
var STRING = {
|
||||
className: 'string',
|
||||
contains: [hljs.BACKSLASH_ESCAPE, SUBST],
|
||||
variants: [
|
||||
{begin: /'/, end: /'/},
|
||||
{begin: /"/, end: /"/},
|
||||
{begin: /`/, end: /`/},
|
||||
{begin: '%[Qwi]?\\(', end: '\\)', contains: recursiveParen('\\(', '\\)')},
|
||||
{begin: '%[Qwi]?\\[', end: '\\]', contains: recursiveParen('\\[', '\\]')},
|
||||
{begin: '%[Qwi]?{', end: '}', contains: recursiveParen('{', '}')},
|
||||
{begin: '%[Qwi]?<', end: '>', contains: recursiveParen('<', '>')},
|
||||
{begin: '%[Qwi]?\\|', end: '\\|'},
|
||||
{begin: /<<-\w+$/, end: /^\s*\w+$/},
|
||||
],
|
||||
relevance: 0,
|
||||
};
|
||||
var Q_STRING = {
|
||||
className: 'string',
|
||||
variants: [
|
||||
{begin: '%q\\(', end: '\\)', contains: recursiveParen('\\(', '\\)')},
|
||||
{begin: '%q\\[', end: '\\]', contains: recursiveParen('\\[', '\\]')},
|
||||
{begin: '%q{', end: '}', contains: recursiveParen('{', '}')},
|
||||
{begin: '%q<', end: '>', contains: recursiveParen('<', '>')},
|
||||
{begin: '%q\\|', end: '\\|'},
|
||||
{begin: /<<-'\w+'$/, end: /^\s*\w+$/},
|
||||
],
|
||||
relevance: 0,
|
||||
};
|
||||
var REGEXP = {
|
||||
begin: '(?!%})(' + hljs.RE_STARTERS_RE + '|\\n|\\b(case|if|select|unless|until|when|while)\\b)\\s*',
|
||||
keywords: 'case if select unless until when while',
|
||||
contains: [
|
||||
{
|
||||
className: 'regexp',
|
||||
contains: [hljs.BACKSLASH_ESCAPE, SUBST],
|
||||
variants: [
|
||||
{begin: '//[a-z]*', relevance: 0},
|
||||
{begin: '/(?!\\/)', end: '/[a-z]*'},
|
||||
]
|
||||
}
|
||||
],
|
||||
relevance: 0
|
||||
};
|
||||
var REGEXP2 = {
|
||||
className: 'regexp',
|
||||
contains: [hljs.BACKSLASH_ESCAPE, SUBST],
|
||||
variants: [
|
||||
{begin: '%r\\(', end: '\\)', contains: recursiveParen('\\(', '\\)')},
|
||||
{begin: '%r\\[', end: '\\]', contains: recursiveParen('\\[', '\\]')},
|
||||
{begin: '%r{', end: '}', contains: recursiveParen('{', '}')},
|
||||
{begin: '%r<', end: '>', contains: recursiveParen('<', '>')},
|
||||
{begin: '%r\\|', end: '\\|'},
|
||||
],
|
||||
relevance: 0
|
||||
};
|
||||
var ATTRIBUTE = {
|
||||
className: 'meta',
|
||||
begin: '@\\[', end: '\\]',
|
||||
contains: [
|
||||
hljs.inherit(hljs.QUOTE_STRING_MODE, {className: 'meta-string'})
|
||||
]
|
||||
};
|
||||
var CRYSTAL_DEFAULT_CONTAINS = [
|
||||
EXPANSION,
|
||||
STRING,
|
||||
Q_STRING,
|
||||
REGEXP2,
|
||||
REGEXP,
|
||||
ATTRIBUTE,
|
||||
hljs.HASH_COMMENT_MODE,
|
||||
{
|
||||
className: 'class',
|
||||
beginKeywords: 'class module struct', end: '$|;',
|
||||
illegal: /=/,
|
||||
contains: [
|
||||
hljs.HASH_COMMENT_MODE,
|
||||
hljs.inherit(hljs.TITLE_MODE, {begin: CRYSTAL_PATH_RE}),
|
||||
{begin: '<'} // relevance booster for inheritance
|
||||
]
|
||||
},
|
||||
{
|
||||
className: 'class',
|
||||
beginKeywords: 'lib enum union', end: '$|;',
|
||||
illegal: /=/,
|
||||
contains: [
|
||||
hljs.HASH_COMMENT_MODE,
|
||||
hljs.inherit(hljs.TITLE_MODE, {begin: CRYSTAL_PATH_RE}),
|
||||
],
|
||||
relevance: 10
|
||||
},
|
||||
{
|
||||
beginKeywords: 'annotation', end: '$|;',
|
||||
illegal: /=/,
|
||||
contains: [
|
||||
hljs.HASH_COMMENT_MODE,
|
||||
hljs.inherit(hljs.TITLE_MODE, {begin: CRYSTAL_PATH_RE}),
|
||||
],
|
||||
relevance: 10
|
||||
},
|
||||
{
|
||||
className: 'function',
|
||||
beginKeywords: 'def', end: /\B\b/,
|
||||
contains: [
|
||||
hljs.inherit(hljs.TITLE_MODE, {
|
||||
begin: CRYSTAL_METHOD_RE,
|
||||
endsParent: true
|
||||
})
|
||||
]
|
||||
},
|
||||
{
|
||||
className: 'function',
|
||||
beginKeywords: 'fun macro', end: /\B\b/,
|
||||
contains: [
|
||||
hljs.inherit(hljs.TITLE_MODE, {
|
||||
begin: CRYSTAL_METHOD_RE,
|
||||
endsParent: true
|
||||
})
|
||||
],
|
||||
relevance: 5
|
||||
},
|
||||
{
|
||||
className: 'symbol',
|
||||
begin: hljs.UNDERSCORE_IDENT_RE + '(\\!|\\?)?:',
|
||||
relevance: 0
|
||||
},
|
||||
{
|
||||
className: 'symbol',
|
||||
begin: ':',
|
||||
contains: [STRING, {begin: CRYSTAL_METHOD_RE}],
|
||||
relevance: 0
|
||||
},
|
||||
{
|
||||
className: 'number',
|
||||
variants: [
|
||||
{ begin: '\\b0b([01_]+)' + INT_SUFFIX },
|
||||
{ begin: '\\b0o([0-7_]+)' + INT_SUFFIX },
|
||||
{ begin: '\\b0x([A-Fa-f0-9_]+)' + INT_SUFFIX },
|
||||
{ begin: '\\b([1-9][0-9_]*[0-9]|[0-9])(\\.[0-9][0-9_]*)?([eE]_*[-+]?[0-9_]*)?' + FLOAT_SUFFIX + '(?!_)' },
|
||||
{ begin: '\\b([1-9][0-9_]*|0)' + INT_SUFFIX }
|
||||
],
|
||||
relevance: 0
|
||||
}
|
||||
];
|
||||
SUBST.contains = CRYSTAL_DEFAULT_CONTAINS;
|
||||
EXPANSION.contains = CRYSTAL_DEFAULT_CONTAINS.slice(1); // without EXPANSION
|
||||
|
||||
return {
|
||||
aliases: ['cr'],
|
||||
lexemes: CRYSTAL_IDENT_RE,
|
||||
keywords: CRYSTAL_KEYWORDS,
|
||||
contains: CRYSTAL_DEFAULT_CONTAINS
|
||||
};
|
||||
};
|
184
src/assets/js/hightlight/languages/cs.js
Normal file
184
src/assets/js/hightlight/languages/cs.js
Normal file
@ -0,0 +1,184 @@
|
||||
module.exports = function(hljs) {
|
||||
var KEYWORDS = {
|
||||
keyword:
|
||||
// Normal keywords.
|
||||
'abstract as base bool break byte case catch char checked const continue decimal ' +
|
||||
'default delegate do double enum event explicit extern finally fixed float ' +
|
||||
'for foreach goto if implicit in int interface internal is lock long nameof ' +
|
||||
'object operator out override params private protected public readonly ref sbyte ' +
|
||||
'sealed short sizeof stackalloc static string struct switch this try typeof ' +
|
||||
'uint ulong unchecked unsafe ushort using virtual void volatile while ' +
|
||||
// Contextual keywords.
|
||||
'add alias ascending async await by descending dynamic equals from get global group into join ' +
|
||||
'let on orderby partial remove select set value var where yield',
|
||||
literal:
|
||||
'null false true'
|
||||
};
|
||||
var NUMBERS = {
|
||||
className: 'number',
|
||||
variants: [
|
||||
{ begin: '\\b(0b[01\']+)' },
|
||||
{ begin: '(-?)\\b([\\d\']+(\\.[\\d\']*)?|\\.[\\d\']+)(u|U|l|L|ul|UL|f|F|b|B)' },
|
||||
{ begin: '(-?)(\\b0[xX][a-fA-F0-9\']+|(\\b[\\d\']+(\\.[\\d\']*)?|\\.[\\d\']+)([eE][-+]?[\\d\']+)?)' }
|
||||
],
|
||||
relevance: 0
|
||||
};
|
||||
var VERBATIM_STRING = {
|
||||
className: 'string',
|
||||
begin: '@"', end: '"',
|
||||
contains: [{begin: '""'}]
|
||||
};
|
||||
var VERBATIM_STRING_NO_LF = hljs.inherit(VERBATIM_STRING, {illegal: /\n/});
|
||||
var SUBST = {
|
||||
className: 'subst',
|
||||
begin: '{', end: '}',
|
||||
keywords: KEYWORDS
|
||||
};
|
||||
var SUBST_NO_LF = hljs.inherit(SUBST, {illegal: /\n/});
|
||||
var INTERPOLATED_STRING = {
|
||||
className: 'string',
|
||||
begin: /\$"/, end: '"',
|
||||
illegal: /\n/,
|
||||
contains: [{begin: '{{'}, {begin: '}}'}, hljs.BACKSLASH_ESCAPE, SUBST_NO_LF]
|
||||
};
|
||||
var INTERPOLATED_VERBATIM_STRING = {
|
||||
className: 'string',
|
||||
begin: /\$@"/, end: '"',
|
||||
contains: [{begin: '{{'}, {begin: '}}'}, {begin: '""'}, SUBST]
|
||||
};
|
||||
var INTERPOLATED_VERBATIM_STRING_NO_LF = hljs.inherit(INTERPOLATED_VERBATIM_STRING, {
|
||||
illegal: /\n/,
|
||||
contains: [{begin: '{{'}, {begin: '}}'}, {begin: '""'}, SUBST_NO_LF]
|
||||
});
|
||||
SUBST.contains = [
|
||||
INTERPOLATED_VERBATIM_STRING,
|
||||
INTERPOLATED_STRING,
|
||||
VERBATIM_STRING,
|
||||
hljs.APOS_STRING_MODE,
|
||||
hljs.QUOTE_STRING_MODE,
|
||||
NUMBERS,
|
||||
hljs.C_BLOCK_COMMENT_MODE
|
||||
];
|
||||
SUBST_NO_LF.contains = [
|
||||
INTERPOLATED_VERBATIM_STRING_NO_LF,
|
||||
INTERPOLATED_STRING,
|
||||
VERBATIM_STRING_NO_LF,
|
||||
hljs.APOS_STRING_MODE,
|
||||
hljs.QUOTE_STRING_MODE,
|
||||
NUMBERS,
|
||||
hljs.inherit(hljs.C_BLOCK_COMMENT_MODE, {illegal: /\n/})
|
||||
];
|
||||
var STRING = {
|
||||
variants: [
|
||||
INTERPOLATED_VERBATIM_STRING,
|
||||
INTERPOLATED_STRING,
|
||||
VERBATIM_STRING,
|
||||
hljs.APOS_STRING_MODE,
|
||||
hljs.QUOTE_STRING_MODE
|
||||
]
|
||||
};
|
||||
|
||||
var TYPE_IDENT_RE = hljs.IDENT_RE + '(<' + hljs.IDENT_RE + '(\\s*,\\s*' + hljs.IDENT_RE + ')*>)?(\\[\\])?';
|
||||
|
||||
return {
|
||||
aliases: ['csharp', 'c#'],
|
||||
keywords: KEYWORDS,
|
||||
illegal: /::/,
|
||||
contains: [
|
||||
hljs.COMMENT(
|
||||
'///',
|
||||
'$',
|
||||
{
|
||||
returnBegin: true,
|
||||
contains: [
|
||||
{
|
||||
className: 'doctag',
|
||||
variants: [
|
||||
{
|
||||
begin: '///', relevance: 0
|
||||
},
|
||||
{
|
||||
begin: '<!--|-->'
|
||||
},
|
||||
{
|
||||
begin: '</?', end: '>'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
),
|
||||
hljs.C_LINE_COMMENT_MODE,
|
||||
hljs.C_BLOCK_COMMENT_MODE,
|
||||
{
|
||||
className: 'meta',
|
||||
begin: '#', end: '$',
|
||||
keywords: {
|
||||
'meta-keyword': 'if else elif endif define undef warning error line region endregion pragma checksum'
|
||||
}
|
||||
},
|
||||
STRING,
|
||||
NUMBERS,
|
||||
{
|
||||
beginKeywords: 'class interface', end: /[{;=]/,
|
||||
illegal: /[^\s:,]/,
|
||||
contains: [
|
||||
hljs.TITLE_MODE,
|
||||
hljs.C_LINE_COMMENT_MODE,
|
||||
hljs.C_BLOCK_COMMENT_MODE
|
||||
]
|
||||
},
|
||||
{
|
||||
beginKeywords: 'namespace', end: /[{;=]/,
|
||||
illegal: /[^\s:]/,
|
||||
contains: [
|
||||
hljs.inherit(hljs.TITLE_MODE, {begin: '[a-zA-Z](\\.?\\w)*'}),
|
||||
hljs.C_LINE_COMMENT_MODE,
|
||||
hljs.C_BLOCK_COMMENT_MODE
|
||||
]
|
||||
},
|
||||
{
|
||||
// [Attributes("")]
|
||||
className: 'meta',
|
||||
begin: '^\\s*\\[', excludeBegin: true, end: '\\]', excludeEnd: true,
|
||||
contains: [
|
||||
{className: 'meta-string', begin: /"/, end: /"/}
|
||||
]
|
||||
},
|
||||
{
|
||||
// Expression keywords prevent 'keyword Name(...)' from being
|
||||
// recognized as a function definition
|
||||
beginKeywords: 'new return throw await else',
|
||||
relevance: 0
|
||||
},
|
||||
{
|
||||
className: 'function',
|
||||
begin: '(' + TYPE_IDENT_RE + '\\s+)+' + hljs.IDENT_RE + '\\s*\\(', returnBegin: true,
|
||||
end: /\s*[{;=]/, excludeEnd: true,
|
||||
keywords: KEYWORDS,
|
||||
contains: [
|
||||
{
|
||||
begin: hljs.IDENT_RE + '\\s*\\(', returnBegin: true,
|
||||
contains: [hljs.TITLE_MODE],
|
||||
relevance: 0
|
||||
},
|
||||
{
|
||||
className: 'params',
|
||||
begin: /\(/, end: /\)/,
|
||||
excludeBegin: true,
|
||||
excludeEnd: true,
|
||||
keywords: KEYWORDS,
|
||||
relevance: 0,
|
||||
contains: [
|
||||
STRING,
|
||||
NUMBERS,
|
||||
hljs.C_BLOCK_COMMENT_MODE
|
||||
]
|
||||
},
|
||||
hljs.C_LINE_COMMENT_MODE,
|
||||
hljs.C_BLOCK_COMMENT_MODE
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
};
|
21
src/assets/js/hightlight/languages/csp.js
Normal file
21
src/assets/js/hightlight/languages/csp.js
Normal file
@ -0,0 +1,21 @@
|
||||
module.exports = function(hljs) {
|
||||
return {
|
||||
case_insensitive: false,
|
||||
lexemes: '[a-zA-Z][a-zA-Z0-9_-]*',
|
||||
keywords: {
|
||||
keyword: 'base-uri child-src connect-src default-src font-src form-action' +
|
||||
' frame-ancestors frame-src img-src media-src object-src plugin-types' +
|
||||
' report-uri sandbox script-src style-src',
|
||||
},
|
||||
contains: [
|
||||
{
|
||||
className: 'string',
|
||||
begin: "'", end: "'"
|
||||
},
|
||||
{
|
||||
className: 'attribute',
|
||||
begin: '^Content', end: ':', excludeEnd: true,
|
||||
},
|
||||
]
|
||||
};
|
||||
};
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user