mirror of
https://github.com/mickael-kerjean/filestash
synced 2025-12-07 17:02:29 +01:00
feature (editor): improve syntax highlight for org mode
This commit is contained in:
parent
6ac1f1f139
commit
636f8a9c6c
1 changed files with 6 additions and 0 deletions
|
|
@ -13,6 +13,12 @@ import 'codemirror/addon/dialog/dialog.js';
|
|||
|
||||
CodeMirror.defineSimpleMode("orgmode", {
|
||||
start: [
|
||||
{regex: /(^\+[^\/]*\+)/, token: ["strikethrough"]},
|
||||
{regex: /(^\*[^\/]*\*)/, token: ["header", "strong"]},
|
||||
{regex: /(^\/[^\/]*\/)/, token: ["em"]},
|
||||
{regex: /(^\_[^\/]*\_)/, token: ["link"]},
|
||||
{regex: /(^\~[^\/]*\~)/, token: ["comment"]},
|
||||
{regex: /(^\=[^\/]*\=)/, token: ["comment"]},
|
||||
{regex: /(^[\*]+)(\s[TODO|NEXT|DONE|DEFERRED|REJECTED|WAITING]{2,})?(.*)/, token: ['comment', 'qualifier', 'header']}, // headline
|
||||
{regex: /\s*\:?[A-Z_]+\:.*/, token: "qualifier"}, // property drawers
|
||||
{regex: /(\#\+[A-Z_]*)(\:.*)/, token: ["keyword", 'qualifier']}, // environments
|
||||
|
|
|
|||
Loading…
Reference in a new issue