config.js 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288
  1. module.exports = {
  2. // LaTex公式、yuml解析服务架设参见 https://github.com/sbfkcel/markdown-server
  3. // 数学公式解析API
  4. // latex:{
  5. // api:'http://towxml.vvadd.com/?tex'
  6. // },
  7. // yuml图解析APPI
  8. // yuml:{
  9. // api:'http://towxml.vvadd.com/?yuml'
  10. // },
  11. // markdown解析配置,保留需要的选项即可
  12. markdown: [
  13. 'sub',
  14. // 下标支持
  15. 'sup',
  16. // 上标支持
  17. 'ins',
  18. // 文本删除线支持
  19. 'mark' // 文本高亮支持
  20. // 'emoji', // emoji表情支持
  21. // 'todo' // todo支持
  22. ],
  23. // 代码高亮配置,保留需要的选项即可(尽量越少越好,不要随意调整顺序。部分高亮有顺序依赖)
  24. highlight: [
  25. 'c-like',
  26. 'c',
  27. 'bash',
  28. 'css',
  29. 'dart',
  30. 'go',
  31. 'java',
  32. 'javascript',
  33. 'json',
  34. 'less',
  35. 'scss',
  36. 'shell',
  37. 'xml',
  38. 'htmlbars',
  39. // "nginx",
  40. // "php",
  41. 'python',
  42. 'python-repl',
  43. 'typescript'
  44. // 'csharp',
  45. // 'http',
  46. // 'swift',
  47. // 'yaml',
  48. // 'markdown',
  49. // 'powershell',
  50. // 'ruby',
  51. // 'makefile',
  52. // 'lua',
  53. // 'stylus',
  54. // 'basic',
  55. // '1c',
  56. // 'abnf',
  57. // 'accesslog',
  58. // 'actionscript',
  59. // 'ada',
  60. // 'angelscript',
  61. // 'apache',
  62. // 'applescript',
  63. // 'arcade',
  64. // 'cpp',
  65. // 'arduino',
  66. // 'armasm',
  67. // 'asciidoc',
  68. // 'aspectj',
  69. // 'autohotkey',
  70. // 'autoit',
  71. // 'avrasm',
  72. // 'awk',
  73. // 'axapta',
  74. // 'bnf',
  75. // 'brainfuck',
  76. // 'cal',
  77. // 'capnproto',
  78. // 'ceylon',
  79. // 'clean',
  80. // 'clojure-repl',
  81. // 'clojure',
  82. // 'cmake',
  83. // 'coffeescript',
  84. // 'coq',
  85. // 'cos',
  86. // 'crmsh',
  87. // 'crystal',
  88. // 'csp',
  89. // 'd',
  90. // 'delphi',
  91. // 'diff',
  92. // 'django',
  93. // 'dns',
  94. // 'dockerfile',
  95. // 'dos',
  96. // 'dsconfig',
  97. // 'dts',
  98. // 'dust',
  99. // 'ebnf',
  100. // 'elixir',
  101. // 'elm',
  102. // 'erb',
  103. // 'erlang-repl',
  104. // 'erlang',
  105. // 'excel',
  106. // 'fix',
  107. // 'flix',
  108. // 'fortran',
  109. // 'fsharp',
  110. // 'gams',
  111. // 'gauss',
  112. // 'gcode',
  113. // 'gherkin',
  114. // 'glsl',
  115. // 'gml',
  116. // 'golo',
  117. // 'gradle',
  118. // 'groovy',
  119. // 'haml',
  120. // 'handlebars',
  121. // 'haskell',
  122. // 'haxe',
  123. // 'hsp',
  124. // 'hy',
  125. // 'inform7',
  126. // 'ini',
  127. // 'irpf90',
  128. // 'isbl',
  129. // 'jboss-cli',
  130. // 'julia-repl',
  131. // 'julia',
  132. // 'kotlin',
  133. // 'lasso',
  134. // 'latex',
  135. // 'ldif',
  136. // 'leaf',
  137. // 'lisp',
  138. // 'livecodeserver',
  139. // 'livescript',
  140. // 'llvm',
  141. // 'lsl',
  142. // 'mathematica',
  143. // 'matlab',
  144. // 'maxima',
  145. // 'mel',
  146. // 'mercury',
  147. // 'mipsasm',
  148. // 'mizar',
  149. // 'mojolicious',
  150. // 'monkey',
  151. // 'moonscript',
  152. // 'n1ql',
  153. // 'nim',
  154. // 'nix',
  155. // 'nsis',
  156. // 'objectivec',
  157. // 'ocaml',
  158. // 'openscad',
  159. // 'oxygene',
  160. // 'parser3',
  161. // 'perl',
  162. // 'pf',
  163. // 'pgsql',
  164. // 'php-template',
  165. // 'plaintext',
  166. // 'pony',
  167. // 'processing',
  168. // 'profile',
  169. // 'prolog',
  170. // 'properties',
  171. // 'protobuf',
  172. // 'puppet',
  173. // 'purebasic',
  174. // 'q',
  175. // 'qml',
  176. // 'r',
  177. // 'reasonml',
  178. // 'rib',
  179. // 'roboconf',
  180. // 'routeros',
  181. // 'rsl',
  182. // 'ruleslanguage',
  183. // 'rust',
  184. // 'sas',
  185. // 'scala',
  186. // 'scheme',
  187. // 'scilab',
  188. // 'smali',
  189. // 'smalltalk',
  190. // 'sml',
  191. // 'sqf',
  192. // 'sql',
  193. // 'stan',
  194. // 'stata',
  195. // 'step21',
  196. // 'subunit',
  197. // 'taggerscript',
  198. // 'tap',
  199. // 'tcl',
  200. // 'thrift',
  201. // 'tp',
  202. // 'twig',
  203. // 'vala',
  204. // 'vbnet',
  205. // 'vbscript-html',
  206. // 'vbscript',
  207. // 'verilog',
  208. // 'vhdl',
  209. // 'vim',
  210. // 'x86asm',
  211. // 'xl',
  212. // 'xquery',
  213. // 'zephir'
  214. ],
  215. // wxml原生标签,该系列标签将不会被转换
  216. wxml: [
  217. 'view',
  218. 'video',
  219. 'text',
  220. 'image',
  221. 'navigator',
  222. 'swiper',
  223. 'swiper-item',
  224. 'block',
  225. 'form',
  226. 'input',
  227. 'textarea',
  228. 'button',
  229. 'checkbox-group',
  230. 'checkbox',
  231. 'radio-group',
  232. 'radio',
  233. 'rich-text'
  234. // 可以解析的标签(html或markdown中会很少使用)
  235. // 'canvas',
  236. // 'map',
  237. // 'slider',
  238. // 'scroll-view',
  239. // 'movable-area',
  240. // 'movable-view',
  241. // 'progress',
  242. // 'label',
  243. // 'switch',
  244. // 'picker',
  245. // 'picker-view',
  246. // 'switch',
  247. // 'contact-button'
  248. ],
  249. // 自定义组件
  250. components: [
  251. 'audio-player',
  252. // 音频组件,建议保留,由于小程序原生audio存在诸多问题,towxml解决了原生音频播放器的相关问题
  253. // "echarts", // echarts图表支持
  254. // "latex", // 数学公式支持
  255. 'table',
  256. // 表格支持
  257. // "todogroup", // todo支持
  258. // "yuml", // yuml图表支持
  259. 'img' // 图片解析组件
  260. ],
  261. // 保留原本的元素属性(建议不要变动)
  262. attrs: ['class', 'data', 'id', 'style'],
  263. // 事件绑定方式(catch或bind),catch 会阻止事件向上冒泡。更多请参考:https://developers.weixin.qq.com/miniprogram/dev/framework/view/wxml/event.html
  264. bindType: 'catch',
  265. // 需要激活的事件
  266. events: [
  267. // 'touchstart',
  268. // 'touchmove',
  269. // 'touchcancel',
  270. // 'touchend',
  271. 'tap' // 用于元素的点击事件
  272. // "change", // 用于todoList的change事件
  273. ],
  274. // 图片倍数
  275. dpr: 1,
  276. // 代码块显示行号
  277. showLineNumber: true
  278. };