Sha256: 78ca67bb9cf50f3e460ecc26b6e9086522f1593781f01fb1375b95fcc0d233b1

Contents?: true

Size: 1.94 KB

Versions: 20

Compression:

Stored size: 1.94 KB

Contents

CodeMirror.defineMode("gfm",function(t){function e(t,e){return t.sol()&&t.match(/^```([\w+#]*)/)?(e.localMode=l(RegExp.$1),e.localMode&&(e.localState=e.localMode.startState()),e.token=o,"code"):a.token(t,e.mdState)}function o(t,o){return t.sol()&&t.match(/^```/)?(o.localMode=o.localState=null,o.token=e,"code"):o.localMode?o.localMode.token(t,o.localState):(t.skipToEnd(),"code")}function r(t,e){var o;if(t.match(/^\w+:\/\/\S+/))return"link";if(t.match(/^[^\[*\\<>` _][^\[*\\<>` ]*[^\[*\\<>` _]/))return a.getType(e);if(o=t.match(/^[^\[*\\<>` ]+/)){var r=o[0];return"_"===r[0]&&"_"===r[r.length-1]?(t.backUp(r.length),void 0):a.getType(e)}return t.eatSpace()?null:void 0}var a=CodeMirror.getMode(t,"markdown"),n={html:"htmlmixed",js:"javascript",json:"application/json",c:"text/x-csrc","c++":"text/x-c++src",java:"text/x-java",csharp:"text/x-csharp","c#":"text/x-csharp"},l=function(){var e,o,r={},a={},l=CodeMirror.listModes();for(e=0;e<l.length;e++)r[l[e]]=l[e];var c=CodeMirror.listMIMEs();for(e=0;e<c.length;e++)o=c[e].mime,a[o]=c[e].mime;for(var i in n)(n[i]in r||n[i]in a)&&(r[i]=n[i]);return function(e){return r[e]?CodeMirror.getMode(t,r[e]):null}}();return{startState:function(){var t=a.startState();return t.text=r,{token:e,mode:"markdown",mdState:t,localMode:null,localState:null}},copyState:function(t){return{token:t.token,mdState:CodeMirror.copyState(a,t.mdState),localMode:t.localMode,localState:t.localMode?CodeMirror.copyState(t.localMode,t.localState):null}},token:function(t,e){var o;if(void 0!=(o=t.peek())&&"["==o){if(t.next(),void 0==(o=t.peek())||"["!=o)return t.backUp(1),e.token(t,e);for(;void 0!=(o=t.next())&&"]"!=o;);if("]"==o&&void 0!=(o=t.next())&&"]"==o)return"link";t.backUp(1)}return t.match(/^\$[^\$]+\$/)?"string":t.match(/^\\\((.*?)\\\)/)?"string":t.match(/^\$\$[^\$]+\$\$/)?"string":t.match(/^\\\[(.*?)\\\]/)?"string":e.token(t,e)},innerMode:function(t){return t.token==e?{state:t.mdState,mode:a}:{state:t.localState,mode:t.localMode}}}},"markdown");

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
rearview-1.2.1-jruby public/rearview/vendor/codemirror/mode/gfm/gfm.js
rearview-1.2.0-jruby public/rearview/vendor/codemirror/mode/gfm/gfm.js
rearview-1.1.2-jruby public/rearview/vendor/codemirror/mode/gfm/gfm.js
rearview-1.1.1-jruby public/rearview/vendor/codemirror/mode/gfm/gfm.js
rearview-1.1.0-jruby public/rearview/vendor/codemirror/mode/gfm/gfm.js
rearview-1.0.3.rc.4-jruby public/rearview/vendor/codemirror/mode/gfm/gfm.js
rearview-1.0.3.rc.3-jruby public/rearview/vendor/codemirror/mode/gfm/gfm.js
rearview-1.0.3.rc.2-jruby public/rearview/vendor/codemirror/mode/gfm/gfm.js
rearview-1.0.3.rc.1-jruby public/rearview/vendor/codemirror/mode/gfm/gfm.js
rearview-1.0.2-jruby public/rearview/vendor/codemirror/mode/gfm/gfm.js
rearview-1.0.2.rc.4-jruby public/rearview/vendor/codemirror/mode/gfm/gfm.js
rearview-1.0.2.rc.3-jruby public/rearview/vendor/codemirror/mode/gfm/gfm.js
rearview-1.0.2.rc.2-jruby public/rearview/vendor/codemirror/mode/gfm/gfm.js
rearview-1.0.2.rc.1-jruby public/rearview/vendor/codemirror/mode/gfm/gfm.js
rearview-1.0.1-jruby public/rearview/vendor/codemirror/mode/gfm/gfm.js
rearview-1.0.0-jruby public/rearview/vendor/codemirror/mode/gfm/gfm.js
rearview-1.0.0.rc5-jruby public/rearview/vendor/codemirror/mode/gfm/gfm.js
rearview-1.0.0.rc4-jruby public/rearview/vendor/codemirror/mode/gfm/gfm.js
rearview-1.0.0.rc3-jruby public/rearview/vendor/codemirror/mode/gfm/gfm.js
rearview-1.0.0.rc2-jruby public/rearview/vendor/codemirror/mode/gfm/gfm.js