From ff4a49d59b3423856f2ccd8ef9461e3368d69707 Mon Sep 17 00:00:00 2001 From: "Ryan P.C. McQuen" Date: Thu, 18 Jan 2018 08:32:37 -0800 Subject: [PATCH] Fix Org mode regex. More details here: https://github.com/mickael-kerjean/nuage/pull/16 --- www/code/orgmode.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/www/code/orgmode.js b/www/code/orgmode.js index 09e19966b..3377ebb15 100644 --- a/www/code/orgmode.js +++ b/www/code/orgmode.js @@ -7,12 +7,12 @@ define([ CodeMirror.defineSimpleMode("orgmode", { start: [ {regex: /^(^\*{1,6}\s)(TODO|DOING|WAITING|NEXT){0,1}(CANCELLED|CANCEL|DEFERRED|DONE|REJECTED|STOP|STOPPED){0,1}(.*)$/, token: ["header org-level-star", "header org-todo", "header org-done", "header"]}, - {regex: /(^\+[^\/]*\+)/, token: ["strikethrough"]}, - {regex: /(^\*[^\/]*\*)/, token: ["strong"]}, - {regex: /(^\/[^\/]*\/)/, token: ["em"]}, - {regex: /(^\_[^\/]*\_)/, token: ["link"]}, - {regex: /(^\~[^\/]*\~)/, token: ["comment"]}, - {regex: /(^\=[^\/]*\=)/, token: ["comment"]}, + {regex: /(\+[^\+]+\+)/, token: ["strikethrough"]}, + {regex: /(\*[^\*]+\*)/, token: ["strong"]}, + {regex: /(\/[^\/]+\/)/, token: ["em"]}, + {regex: /(\_[^\_]+\_)/, token: ["link"]}, + {regex: /(\~[^\~]+\~)/, token: ["comment"]}, + {regex: /(\=[^\=]+\=)/, token: ["comment"]}, {regex: /\[\[[^\[\]]*\]\[[^\[\]]*\]\]/, token: "url"}, // links {regex: /\[[xX\s]?\]/, token: 'qualifier'}, // checkbox {regex: /\#\+BEGIN_[A-Z]*/, token: "comment", next: "env"}, // comments