jekyll-theme-anc 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/README.md +1 -0
- data/_includes/disqus.html +42 -0
- data/_includes/facebook_share_btn.html +1 -0
- data/_includes/footer.html +79 -0
- data/_includes/go2top.html +22 -0
- data/_includes/google-analytics.html +11 -0
- data/_includes/head.html +50 -0
- data/_includes/header.html +13 -0
- data/_includes/jspdf.html +41 -0
- data/_includes/nav.html +25 -0
- data/_includes/pageloginpoper.html +59 -0
- data/_includes/post-categories.html +8 -0
- data/_includes/post_seo.html +59 -0
- data/_includes/youtube_video.html +11 -0
- data/_layouts/blog.html +33 -0
- data/_layouts/default.html +151 -0
- data/_layouts/home.html +26 -0
- data/_layouts/page.html +5 -0
- data/_layouts/post.html +83 -0
- data/_sass/anc.scss +9 -0
- data/_sass/anc/_base.scss +144 -0
- data/_sass/anc/_layout.scss +0 -0
- data/_sass/anc/_materialize.scss +38 -0
- data/_sass/anc/_syntax-highlighting.scss +78 -0
- data/_sass/anc/components/_variables.scss +343 -0
- data/_sass/materialize-css/components/_badges.scss +47 -0
- data/_sass/materialize-css/components/_buttons.scss +291 -0
- data/_sass/materialize-css/components/_cards.scss +196 -0
- data/_sass/materialize-css/components/_carousel.scss +90 -0
- data/_sass/materialize-css/components/_chips.scss +89 -0
- data/_sass/materialize-css/components/_collapsible.scss +84 -0
- data/_sass/materialize-css/components/_color.scss +412 -0
- data/_sass/materialize-css/components/_dropdown.scss +68 -0
- data/_sass/materialize-css/components/_global.scss +734 -0
- data/_sass/materialize-css/components/_grid.scss +156 -0
- data/_sass/materialize-css/components/_icons-material-design.scss +5 -0
- data/_sass/materialize-css/components/_materialbox.scss +43 -0
- data/_sass/materialize-css/components/_modal.scss +90 -0
- data/_sass/materialize-css/components/_navbar.scss +208 -0
- data/_sass/materialize-css/components/_normalize.scss +424 -0
- data/_sass/materialize-css/components/_preloader.scss +334 -0
- data/_sass/materialize-css/components/_pulse.scss +34 -0
- data/_sass/materialize-css/components/_roboto.scss +39 -0
- data/_sass/materialize-css/components/_sideNav.scss +214 -0
- data/_sass/materialize-css/components/_slider.scss +92 -0
- data/_sass/materialize-css/components/_table_of_contents.scss +33 -0
- data/_sass/materialize-css/components/_tabs.scss +93 -0
- data/_sass/materialize-css/components/_tapTarget.scss +103 -0
- data/_sass/materialize-css/components/_toast.scss +59 -0
- data/_sass/materialize-css/components/_tooltip.scss +31 -0
- data/_sass/materialize-css/components/_transitions.scss +13 -0
- data/_sass/materialize-css/components/_typography.scss +61 -0
- data/_sass/materialize-css/components/_variables.scss +343 -0
- data/_sass/materialize-css/components/_waves.scss +114 -0
- data/_sass/materialize-css/components/date_picker/_default.date.scss +456 -0
- data/_sass/materialize-css/components/date_picker/_default.scss +212 -0
- data/_sass/materialize-css/components/date_picker/_default.time.scss +267 -0
- data/_sass/materialize-css/components/forms/_checkboxes.scss +210 -0
- data/_sass/materialize-css/components/forms/_file-input.scss +44 -0
- data/_sass/materialize-css/components/forms/_forms.scss +22 -0
- data/_sass/materialize-css/components/forms/_input-fields.scss +333 -0
- data/_sass/materialize-css/components/forms/_radio-buttons.scss +115 -0
- data/_sass/materialize-css/components/forms/_range.scss +160 -0
- data/_sass/materialize-css/components/forms/_select.scss +182 -0
- data/_sass/materialize-css/components/forms/_switches.scss +89 -0
- data/_sass/materialize-css/materialize.scss +42 -0
- data/_sass/materialize/components/_badges.scss +47 -0
- data/_sass/materialize/components/_buttons.scss +291 -0
- data/_sass/materialize/components/_cards.scss +196 -0
- data/_sass/materialize/components/_carousel.scss +90 -0
- data/_sass/materialize/components/_chips.scss +89 -0
- data/_sass/materialize/components/_collapsible.scss +84 -0
- data/_sass/materialize/components/_color.scss +412 -0
- data/_sass/materialize/components/_dropdown.scss +68 -0
- data/_sass/materialize/components/_global.scss +734 -0
- data/_sass/materialize/components/_grid.scss +156 -0
- data/_sass/materialize/components/_icons-material-design.scss +5 -0
- data/_sass/materialize/components/_materialbox.scss +43 -0
- data/_sass/materialize/components/_modal.scss +90 -0
- data/_sass/materialize/components/_navbar.scss +208 -0
- data/_sass/materialize/components/_normalize.scss +424 -0
- data/_sass/materialize/components/_preloader.scss +334 -0
- data/_sass/materialize/components/_pulse.scss +34 -0
- data/_sass/materialize/components/_roboto.scss +39 -0
- data/_sass/materialize/components/_sideNav.scss +214 -0
- data/_sass/materialize/components/_slider.scss +92 -0
- data/_sass/materialize/components/_table_of_contents.scss +33 -0
- data/_sass/materialize/components/_tabs.scss +93 -0
- data/_sass/materialize/components/_tapTarget.scss +103 -0
- data/_sass/materialize/components/_toast.scss +59 -0
- data/_sass/materialize/components/_tooltip.scss +31 -0
- data/_sass/materialize/components/_transitions.scss +13 -0
- data/_sass/materialize/components/_typography.scss +61 -0
- data/_sass/materialize/components/_variables.scss +343 -0
- data/_sass/materialize/components/_waves.scss +114 -0
- data/_sass/materialize/components/date_picker/_default.date.scss +456 -0
- data/_sass/materialize/components/date_picker/_default.scss +212 -0
- data/_sass/materialize/components/date_picker/_default.time.scss +267 -0
- data/_sass/materialize/components/forms/_checkboxes.scss +210 -0
- data/_sass/materialize/components/forms/_file-input.scss +44 -0
- data/_sass/materialize/components/forms/_forms.scss +22 -0
- data/_sass/materialize/components/forms/_input-fields.scss +333 -0
- data/_sass/materialize/components/forms/_radio-buttons.scss +115 -0
- data/_sass/materialize/components/forms/_range.scss +160 -0
- data/_sass/materialize/components/forms/_select.scss +182 -0
- data/_sass/materialize/components/forms/_switches.scss +89 -0
- data/_sass/materialize/materialize.scss +42 -0
- data/assets/fonts/FontAwesome.otf +0 -0
- data/assets/fonts/fontawesome-webfont.eot +0 -0
- data/assets/fonts/fontawesome-webfont.svg +2671 -0
- data/assets/fonts/fontawesome-webfont.ttf +0 -0
- data/assets/fonts/fontawesome-webfont.woff +0 -0
- data/assets/fonts/fontawesome-webfont.woff2 +0 -0
- data/assets/fonts/roboto/Roboto-Bold.woff +0 -0
- data/assets/fonts/roboto/Roboto-Bold.woff2 +0 -0
- data/assets/fonts/roboto/Roboto-Light.woff +0 -0
- data/assets/fonts/roboto/Roboto-Light.woff2 +0 -0
- data/assets/fonts/roboto/Roboto-Medium.woff +0 -0
- data/assets/fonts/roboto/Roboto-Medium.woff2 +0 -0
- data/assets/fonts/roboto/Roboto-Regular.woff +0 -0
- data/assets/fonts/roboto/Roboto-Regular.woff2 +0 -0
- data/assets/fonts/roboto/Roboto-Thin.woff +0 -0
- data/assets/fonts/roboto/Roboto-Thin.woff2 +0 -0
- data/assets/images/close.png +0 -0
- data/assets/images/loader.gif +0 -0
- data/assets/img/icons/facebook-square.png +0 -0
- data/assets/img/icons/github-square.png +0 -0
- data/assets/img/icons/twitter-square.png +0 -0
- data/assets/img/icons/youtube-square.png +0 -0
- data/assets/img/jubayed11.37-16.jpg +0 -0
- data/assets/img/parallax1.jpg +0 -0
- data/assets/img/sample-1.jpg +0 -0
- data/assets/js/custom_script.js +200 -0
- data/assets/js/highlight.pack.js +2 -0
- data/assets/js/materialize.min.js +6 -0
- data/assets/js/mode/apl/apl.js +174 -0
- data/assets/js/mode/asciiarmor/asciiarmor.js +74 -0
- data/assets/js/mode/asn.1/asn.1.js +204 -0
- data/assets/js/mode/asterisk/asterisk.js +196 -0
- data/assets/js/mode/brainfuck/brainfuck.js +85 -0
- data/assets/js/mode/clike/clike.js +789 -0
- data/assets/js/mode/clojure/clojure.js +306 -0
- data/assets/js/mode/cmake/cmake.js +97 -0
- data/assets/js/mode/cobol/cobol.js +255 -0
- data/assets/js/mode/coffeescript/coffeescript.js +359 -0
- data/assets/js/mode/commonlisp/commonlisp.js +124 -0
- data/assets/js/mode/crystal/crystal.js +433 -0
- data/assets/js/mode/css/css.js +831 -0
- data/assets/js/mode/cypher/cypher.js +150 -0
- data/assets/js/mode/d/d.js +218 -0
- data/assets/js/mode/dart/dart.js +157 -0
- data/assets/js/mode/diff/diff.js +47 -0
- data/assets/js/mode/django/django.js +356 -0
- data/assets/js/mode/dockerfile/dockerfile.js +79 -0
- data/assets/js/mode/dtd/dtd.js +142 -0
- data/assets/js/mode/dylan/dylan.js +352 -0
- data/assets/js/mode/ebnf/ebnf.js +195 -0
- data/assets/js/mode/ecl/ecl.js +206 -0
- data/assets/js/mode/eiffel/eiffel.js +160 -0
- data/assets/js/mode/elm/elm.js +205 -0
- data/assets/js/mode/erlang/erlang.js +619 -0
- data/assets/js/mode/factor/factor.js +85 -0
- data/assets/js/mode/fcl/fcl.js +173 -0
- data/assets/js/mode/forth/forth.js +180 -0
- data/assets/js/mode/fortran/fortran.js +188 -0
- data/assets/js/mode/gas/gas.js +345 -0
- data/assets/js/mode/gfm/gfm.js +129 -0
- data/assets/js/mode/gherkin/gherkin.js +178 -0
- data/assets/js/mode/go/go.js +187 -0
- data/assets/js/mode/groovy/groovy.js +230 -0
- data/assets/js/mode/haml/haml.js +161 -0
- data/assets/js/mode/handlebars/handlebars.js +62 -0
- data/assets/js/mode/haskell-literate/haskell-literate.js +43 -0
- data/assets/js/mode/haskell/haskell.js +267 -0
- data/assets/js/mode/haxe/haxe.js +515 -0
- data/assets/js/mode/htmlembedded/htmlembedded.js +28 -0
- data/assets/js/mode/htmlmixed/htmlmixed.js +152 -0
- data/assets/js/mode/http/http.js +113 -0
- data/assets/js/mode/idl/idl.js +290 -0
- data/assets/js/mode/javascript/javascript.js +838 -0
- data/assets/js/mode/jinja2/jinja2.js +142 -0
- data/assets/js/mode/jsx/jsx.js +148 -0
- data/assets/js/mode/julia/julia.js +418 -0
- data/assets/js/mode/livescript/livescript.js +280 -0
- data/assets/js/mode/lua/lua.js +159 -0
- data/assets/js/mode/markdown/markdown.js +859 -0
- data/assets/js/mode/mathematica/mathematica.js +176 -0
- data/assets/js/mode/mbox/mbox.js +129 -0
- data/assets/js/mode/meta.js +215 -0
- data/assets/js/mode/mirc/mirc.js +193 -0
- data/assets/js/mode/mllike/mllike.js +208 -0
- data/assets/js/mode/modelica/modelica.js +245 -0
- data/assets/js/mode/mscgen/mscgen.js +175 -0
- data/assets/js/mode/mumps/mumps.js +148 -0
- data/assets/js/mode/nginx/nginx.js +178 -0
- data/assets/js/mode/nsis/nsis.js +95 -0
- data/assets/js/mode/ntriples/ntriples.js +195 -0
- data/assets/js/mode/octave/octave.js +139 -0
- data/assets/js/mode/oz/oz.js +252 -0
- data/assets/js/mode/pascal/pascal.js +109 -0
- data/assets/js/mode/pegjs/pegjs.js +114 -0
- data/assets/js/mode/perl/perl.js +837 -0
- data/assets/js/mode/php/php.js +234 -0
- data/assets/js/mode/pig/pig.js +178 -0
- data/assets/js/mode/powershell/powershell.js +398 -0
- data/assets/js/mode/properties/properties.js +78 -0
- data/assets/js/mode/protobuf/protobuf.js +68 -0
- data/assets/js/mode/pug/pug.js +591 -0
- data/assets/js/mode/puppet/puppet.js +220 -0
- data/assets/js/mode/python/python.js +334 -0
- data/assets/js/mode/q/q.js +139 -0
- data/assets/js/mode/r/r.js +183 -0
- data/assets/js/mode/rpm/changes/index.html +66 -0
- data/assets/js/mode/rpm/rpm.js +109 -0
- data/assets/js/mode/rst/rst.js +557 -0
- data/assets/js/mode/ruby/ruby.js +295 -0
- data/assets/js/mode/rust/rust.js +72 -0
- data/assets/js/mode/sas/sas.js +303 -0
- data/assets/js/mode/sass/sass.js +454 -0
- data/assets/js/mode/scheme/scheme.js +249 -0
- data/assets/js/mode/shell/shell.js +142 -0
- data/assets/js/mode/sieve/sieve.js +193 -0
- data/assets/js/mode/slim/slim.js +575 -0
- data/assets/js/mode/smalltalk/smalltalk.js +168 -0
- data/assets/js/mode/smarty/smarty.js +225 -0
- data/assets/js/mode/solr/solr.js +104 -0
- data/assets/js/mode/soy/soy.js +342 -0
- data/assets/js/mode/sparql/sparql.js +180 -0
- data/assets/js/mode/spreadsheet/spreadsheet.js +112 -0
- data/assets/js/mode/sql/sql.js +475 -0
- data/assets/js/mode/stex/stex.js +251 -0
- data/assets/js/mode/stylus/stylus.js +771 -0
- data/assets/js/mode/swift/swift.js +210 -0
- data/assets/js/mode/tcl/tcl.js +139 -0
- data/assets/js/mode/textile/textile.js +469 -0
- data/assets/js/mode/tiddlywiki/tiddlywiki.css +14 -0
- data/assets/js/mode/tiddlywiki/tiddlywiki.js +308 -0
- data/assets/js/mode/tiki/tiki.css +26 -0
- data/assets/js/mode/tiki/tiki.js +312 -0
- data/assets/js/mode/toml/toml.js +88 -0
- data/assets/js/mode/tornado/tornado.js +68 -0
- data/assets/js/mode/troff/troff.js +84 -0
- data/assets/js/mode/ttcn-cfg/ttcn-cfg.js +214 -0
- data/assets/js/mode/ttcn/ttcn.js +283 -0
- data/assets/js/mode/turtle/turtle.js +162 -0
- data/assets/js/mode/twig/twig.js +141 -0
- data/assets/js/mode/vb/vb.js +275 -0
- data/assets/js/mode/vbscript/vbscript.js +350 -0
- data/assets/js/mode/velocity/velocity.js +201 -0
- data/assets/js/mode/verilog/verilog.js +675 -0
- data/assets/js/mode/vhdl/vhdl.js +189 -0
- data/assets/js/mode/vue/vue.js +70 -0
- data/assets/js/mode/webidl/webidl.js +195 -0
- data/assets/js/mode/xml/xml.js +394 -0
- data/assets/js/mode/xquery/xquery.js +448 -0
- data/assets/js/mode/yacas/yacas.js +204 -0
- data/assets/js/mode/yaml-frontmatter/yaml-frontmatter.js +68 -0
- data/assets/js/mode/yaml/yaml.js +118 -0
- data/assets/js/mode/z80/z80.js +116 -0
- data/assets/main.scss +5 -0
- metadata +347 -0
@@ -0,0 +1,139 @@
|
|
1
|
+
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
2
|
+
// Distributed under an MIT license: http://codemirror.net/LICENSE
|
3
|
+
|
4
|
+
(function(mod) {
|
5
|
+
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
6
|
+
mod(require("../../lib/codemirror"));
|
7
|
+
else if (typeof define == "function" && define.amd) // AMD
|
8
|
+
define(["../../lib/codemirror"], mod);
|
9
|
+
else // Plain browser env
|
10
|
+
mod(CodeMirror);
|
11
|
+
})(function(CodeMirror) {
|
12
|
+
"use strict";
|
13
|
+
|
14
|
+
CodeMirror.defineMode("q",function(config){
|
15
|
+
var indentUnit=config.indentUnit,
|
16
|
+
curPunc,
|
17
|
+
keywords=buildRE(["abs","acos","aj","aj0","all","and","any","asc","asin","asof","atan","attr","avg","avgs","bin","by","ceiling","cols","cor","cos","count","cov","cross","csv","cut","delete","deltas","desc","dev","differ","distinct","div","do","each","ej","enlist","eval","except","exec","exit","exp","fby","fills","first","fkeys","flip","floor","from","get","getenv","group","gtime","hclose","hcount","hdel","hopen","hsym","iasc","idesc","if","ij","in","insert","inter","inv","key","keys","last","like","list","lj","load","log","lower","lsq","ltime","ltrim","mavg","max","maxs","mcount","md5","mdev","med","meta","min","mins","mmax","mmin","mmu","mod","msum","neg","next","not","null","or","over","parse","peach","pj","plist","prd","prds","prev","prior","rand","rank","ratios","raze","read0","read1","reciprocal","reverse","rload","rotate","rsave","rtrim","save","scan","select","set","setenv","show","signum","sin","sqrt","ss","ssr","string","sublist","sum","sums","sv","system","tables","tan","til","trim","txf","type","uj","ungroup","union","update","upper","upsert","value","var","view","views","vs","wavg","where","where","while","within","wj","wj1","wsum","xasc","xbar","xcol","xcols","xdesc","xexp","xgroup","xkey","xlog","xprev","xrank"]),
|
18
|
+
E=/[|/&^!+:\\\-*%$=~#;@><,?_\'\"\[\(\]\)\s{}]/;
|
19
|
+
function buildRE(w){return new RegExp("^("+w.join("|")+")$");}
|
20
|
+
function tokenBase(stream,state){
|
21
|
+
var sol=stream.sol(),c=stream.next();
|
22
|
+
curPunc=null;
|
23
|
+
if(sol)
|
24
|
+
if(c=="/")
|
25
|
+
return(state.tokenize=tokenLineComment)(stream,state);
|
26
|
+
else if(c=="\\"){
|
27
|
+
if(stream.eol()||/\s/.test(stream.peek()))
|
28
|
+
return stream.skipToEnd(),/^\\\s*$/.test(stream.current())?(state.tokenize=tokenCommentToEOF)(stream):state.tokenize=tokenBase,"comment";
|
29
|
+
else
|
30
|
+
return state.tokenize=tokenBase,"builtin";
|
31
|
+
}
|
32
|
+
if(/\s/.test(c))
|
33
|
+
return stream.peek()=="/"?(stream.skipToEnd(),"comment"):"whitespace";
|
34
|
+
if(c=='"')
|
35
|
+
return(state.tokenize=tokenString)(stream,state);
|
36
|
+
if(c=='`')
|
37
|
+
return stream.eatWhile(/[A-Za-z\d_:\/.]/),"symbol";
|
38
|
+
if(("."==c&&/\d/.test(stream.peek()))||/\d/.test(c)){
|
39
|
+
var t=null;
|
40
|
+
stream.backUp(1);
|
41
|
+
if(stream.match(/^\d{4}\.\d{2}(m|\.\d{2}([DT](\d{2}(:\d{2}(:\d{2}(\.\d{1,9})?)?)?)?)?)/)
|
42
|
+
|| stream.match(/^\d+D(\d{2}(:\d{2}(:\d{2}(\.\d{1,9})?)?)?)/)
|
43
|
+
|| stream.match(/^\d{2}:\d{2}(:\d{2}(\.\d{1,9})?)?/)
|
44
|
+
|| stream.match(/^\d+[ptuv]{1}/))
|
45
|
+
t="temporal";
|
46
|
+
else if(stream.match(/^0[NwW]{1}/)
|
47
|
+
|| stream.match(/^0x[\da-fA-F]*/)
|
48
|
+
|| stream.match(/^[01]+[b]{1}/)
|
49
|
+
|| stream.match(/^\d+[chijn]{1}/)
|
50
|
+
|| stream.match(/-?\d*(\.\d*)?(e[+\-]?\d+)?(e|f)?/))
|
51
|
+
t="number";
|
52
|
+
return(t&&(!(c=stream.peek())||E.test(c)))?t:(stream.next(),"error");
|
53
|
+
}
|
54
|
+
if(/[A-Za-z]|\./.test(c))
|
55
|
+
return stream.eatWhile(/[A-Za-z._\d]/),keywords.test(stream.current())?"keyword":"variable";
|
56
|
+
if(/[|/&^!+:\\\-*%$=~#;@><\.,?_\']/.test(c))
|
57
|
+
return null;
|
58
|
+
if(/[{}\(\[\]\)]/.test(c))
|
59
|
+
return null;
|
60
|
+
return"error";
|
61
|
+
}
|
62
|
+
function tokenLineComment(stream,state){
|
63
|
+
return stream.skipToEnd(),/\/\s*$/.test(stream.current())?(state.tokenize=tokenBlockComment)(stream,state):(state.tokenize=tokenBase),"comment";
|
64
|
+
}
|
65
|
+
function tokenBlockComment(stream,state){
|
66
|
+
var f=stream.sol()&&stream.peek()=="\\";
|
67
|
+
stream.skipToEnd();
|
68
|
+
if(f&&/^\\\s*$/.test(stream.current()))
|
69
|
+
state.tokenize=tokenBase;
|
70
|
+
return"comment";
|
71
|
+
}
|
72
|
+
function tokenCommentToEOF(stream){return stream.skipToEnd(),"comment";}
|
73
|
+
function tokenString(stream,state){
|
74
|
+
var escaped=false,next,end=false;
|
75
|
+
while((next=stream.next())){
|
76
|
+
if(next=="\""&&!escaped){end=true;break;}
|
77
|
+
escaped=!escaped&&next=="\\";
|
78
|
+
}
|
79
|
+
if(end)state.tokenize=tokenBase;
|
80
|
+
return"string";
|
81
|
+
}
|
82
|
+
function pushContext(state,type,col){state.context={prev:state.context,indent:state.indent,col:col,type:type};}
|
83
|
+
function popContext(state){state.indent=state.context.indent;state.context=state.context.prev;}
|
84
|
+
return{
|
85
|
+
startState:function(){
|
86
|
+
return{tokenize:tokenBase,
|
87
|
+
context:null,
|
88
|
+
indent:0,
|
89
|
+
col:0};
|
90
|
+
},
|
91
|
+
token:function(stream,state){
|
92
|
+
if(stream.sol()){
|
93
|
+
if(state.context&&state.context.align==null)
|
94
|
+
state.context.align=false;
|
95
|
+
state.indent=stream.indentation();
|
96
|
+
}
|
97
|
+
//if (stream.eatSpace()) return null;
|
98
|
+
var style=state.tokenize(stream,state);
|
99
|
+
if(style!="comment"&&state.context&&state.context.align==null&&state.context.type!="pattern"){
|
100
|
+
state.context.align=true;
|
101
|
+
}
|
102
|
+
if(curPunc=="(")pushContext(state,")",stream.column());
|
103
|
+
else if(curPunc=="[")pushContext(state,"]",stream.column());
|
104
|
+
else if(curPunc=="{")pushContext(state,"}",stream.column());
|
105
|
+
else if(/[\]\}\)]/.test(curPunc)){
|
106
|
+
while(state.context&&state.context.type=="pattern")popContext(state);
|
107
|
+
if(state.context&&curPunc==state.context.type)popContext(state);
|
108
|
+
}
|
109
|
+
else if(curPunc=="."&&state.context&&state.context.type=="pattern")popContext(state);
|
110
|
+
else if(/atom|string|variable/.test(style)&&state.context){
|
111
|
+
if(/[\}\]]/.test(state.context.type))
|
112
|
+
pushContext(state,"pattern",stream.column());
|
113
|
+
else if(state.context.type=="pattern"&&!state.context.align){
|
114
|
+
state.context.align=true;
|
115
|
+
state.context.col=stream.column();
|
116
|
+
}
|
117
|
+
}
|
118
|
+
return style;
|
119
|
+
},
|
120
|
+
indent:function(state,textAfter){
|
121
|
+
var firstChar=textAfter&&textAfter.charAt(0);
|
122
|
+
var context=state.context;
|
123
|
+
if(/[\]\}]/.test(firstChar))
|
124
|
+
while (context&&context.type=="pattern")context=context.prev;
|
125
|
+
var closing=context&&firstChar==context.type;
|
126
|
+
if(!context)
|
127
|
+
return 0;
|
128
|
+
else if(context.type=="pattern")
|
129
|
+
return context.col;
|
130
|
+
else if(context.align)
|
131
|
+
return context.col+(closing?0:1);
|
132
|
+
else
|
133
|
+
return context.indent+(closing?0:indentUnit);
|
134
|
+
}
|
135
|
+
};
|
136
|
+
});
|
137
|
+
CodeMirror.defineMIME("text/x-q","q");
|
138
|
+
|
139
|
+
});
|
@@ -0,0 +1,183 @@
|
|
1
|
+
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
2
|
+
// Distributed under an MIT license: http://codemirror.net/LICENSE
|
3
|
+
|
4
|
+
(function(mod) {
|
5
|
+
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
6
|
+
mod(require("../../lib/codemirror"));
|
7
|
+
else if (typeof define == "function" && define.amd) // AMD
|
8
|
+
define(["../../lib/codemirror"], mod);
|
9
|
+
else // Plain browser env
|
10
|
+
mod(CodeMirror);
|
11
|
+
})(function(CodeMirror) {
|
12
|
+
"use strict";
|
13
|
+
|
14
|
+
CodeMirror.registerHelper("wordChars", "r", /[\w.]/);
|
15
|
+
|
16
|
+
CodeMirror.defineMode("r", function(config) {
|
17
|
+
function wordObj(str) {
|
18
|
+
var words = str.split(" "), res = {};
|
19
|
+
for (var i = 0; i < words.length; ++i) res[words[i]] = true;
|
20
|
+
return res;
|
21
|
+
}
|
22
|
+
var atoms = wordObj("NULL NA Inf NaN NA_integer_ NA_real_ NA_complex_ NA_character_");
|
23
|
+
var builtins = wordObj("list quote bquote eval return call parse deparse");
|
24
|
+
var keywords = wordObj("if else repeat while function for in next break");
|
25
|
+
var blockkeywords = wordObj("if else repeat while function for");
|
26
|
+
var opChars = /[+\-*\/^<>=!&|~$:]/;
|
27
|
+
var curPunc;
|
28
|
+
|
29
|
+
function tokenBase(stream, state) {
|
30
|
+
curPunc = null;
|
31
|
+
var ch = stream.next();
|
32
|
+
if (ch == "#") {
|
33
|
+
stream.skipToEnd();
|
34
|
+
return "comment";
|
35
|
+
} else if (ch == "0" && stream.eat("x")) {
|
36
|
+
stream.eatWhile(/[\da-f]/i);
|
37
|
+
return "number";
|
38
|
+
} else if (ch == "." && stream.eat(/\d/)) {
|
39
|
+
stream.match(/\d*(?:e[+\-]?\d+)?/);
|
40
|
+
return "number";
|
41
|
+
} else if (/\d/.test(ch)) {
|
42
|
+
stream.match(/\d*(?:\.\d+)?(?:e[+\-]\d+)?L?/);
|
43
|
+
return "number";
|
44
|
+
} else if (ch == "'" || ch == '"') {
|
45
|
+
state.tokenize = tokenString(ch);
|
46
|
+
return "string";
|
47
|
+
} else if (ch == "`") {
|
48
|
+
stream.match(/[^`]+`/);
|
49
|
+
return "variable-3";
|
50
|
+
} else if (ch == "." && stream.match(/.[.\d]+/)) {
|
51
|
+
return "keyword";
|
52
|
+
} else if (/[\w\.]/.test(ch) && ch != "_") {
|
53
|
+
stream.eatWhile(/[\w\.]/);
|
54
|
+
var word = stream.current();
|
55
|
+
if (atoms.propertyIsEnumerable(word)) return "atom";
|
56
|
+
if (keywords.propertyIsEnumerable(word)) {
|
57
|
+
// Block keywords start new blocks, except 'else if', which only starts
|
58
|
+
// one new block for the 'if', no block for the 'else'.
|
59
|
+
if (blockkeywords.propertyIsEnumerable(word) &&
|
60
|
+
!stream.match(/\s*if(\s+|$)/, false))
|
61
|
+
curPunc = "block";
|
62
|
+
return "keyword";
|
63
|
+
}
|
64
|
+
if (builtins.propertyIsEnumerable(word)) return "builtin";
|
65
|
+
return "variable";
|
66
|
+
} else if (ch == "%") {
|
67
|
+
if (stream.skipTo("%")) stream.next();
|
68
|
+
return "operator variable-2";
|
69
|
+
} else if (
|
70
|
+
(ch == "<" && stream.eat("-")) ||
|
71
|
+
(ch == "<" && stream.match("<-")) ||
|
72
|
+
(ch == "-" && stream.match(/>>?/))
|
73
|
+
) {
|
74
|
+
return "operator arrow";
|
75
|
+
} else if (ch == "=" && state.ctx.argList) {
|
76
|
+
return "arg-is";
|
77
|
+
} else if (opChars.test(ch)) {
|
78
|
+
if (ch == "$") return "operator dollar";
|
79
|
+
stream.eatWhile(opChars);
|
80
|
+
return "operator";
|
81
|
+
} else if (/[\(\){}\[\];]/.test(ch)) {
|
82
|
+
curPunc = ch;
|
83
|
+
if (ch == ";") return "semi";
|
84
|
+
return null;
|
85
|
+
} else {
|
86
|
+
return null;
|
87
|
+
}
|
88
|
+
}
|
89
|
+
|
90
|
+
function tokenString(quote) {
|
91
|
+
return function(stream, state) {
|
92
|
+
if (stream.eat("\\")) {
|
93
|
+
var ch = stream.next();
|
94
|
+
if (ch == "x") stream.match(/^[a-f0-9]{2}/i);
|
95
|
+
else if ((ch == "u" || ch == "U") && stream.eat("{") && stream.skipTo("}")) stream.next();
|
96
|
+
else if (ch == "u") stream.match(/^[a-f0-9]{4}/i);
|
97
|
+
else if (ch == "U") stream.match(/^[a-f0-9]{8}/i);
|
98
|
+
else if (/[0-7]/.test(ch)) stream.match(/^[0-7]{1,2}/);
|
99
|
+
return "string-2";
|
100
|
+
} else {
|
101
|
+
var next;
|
102
|
+
while ((next = stream.next()) != null) {
|
103
|
+
if (next == quote) { state.tokenize = tokenBase; break; }
|
104
|
+
if (next == "\\") { stream.backUp(1); break; }
|
105
|
+
}
|
106
|
+
return "string";
|
107
|
+
}
|
108
|
+
};
|
109
|
+
}
|
110
|
+
|
111
|
+
var ALIGN_YES = 1, ALIGN_NO = 2, BRACELESS = 4
|
112
|
+
|
113
|
+
function push(state, type, stream) {
|
114
|
+
state.ctx = {type: type,
|
115
|
+
indent: state.indent,
|
116
|
+
flags: 0,
|
117
|
+
column: stream.column(),
|
118
|
+
prev: state.ctx};
|
119
|
+
}
|
120
|
+
function setFlag(state, flag) {
|
121
|
+
var ctx = state.ctx
|
122
|
+
state.ctx = {type: ctx.type,
|
123
|
+
indent: ctx.indent,
|
124
|
+
flags: ctx.flags | flag,
|
125
|
+
column: ctx.column,
|
126
|
+
prev: ctx.prev}
|
127
|
+
}
|
128
|
+
function pop(state) {
|
129
|
+
state.indent = state.ctx.indent;
|
130
|
+
state.ctx = state.ctx.prev;
|
131
|
+
}
|
132
|
+
|
133
|
+
return {
|
134
|
+
startState: function() {
|
135
|
+
return {tokenize: tokenBase,
|
136
|
+
ctx: {type: "top",
|
137
|
+
indent: -config.indentUnit,
|
138
|
+
flags: ALIGN_NO},
|
139
|
+
indent: 0,
|
140
|
+
afterIdent: false};
|
141
|
+
},
|
142
|
+
|
143
|
+
token: function(stream, state) {
|
144
|
+
if (stream.sol()) {
|
145
|
+
if ((state.ctx.flags & 3) == 0) state.ctx.flags |= ALIGN_NO
|
146
|
+
if (state.ctx.flags & BRACELESS) pop(state)
|
147
|
+
state.indent = stream.indentation();
|
148
|
+
}
|
149
|
+
if (stream.eatSpace()) return null;
|
150
|
+
var style = state.tokenize(stream, state);
|
151
|
+
if (style != "comment" && (state.ctx.flags & ALIGN_NO) == 0) setFlag(state, ALIGN_YES)
|
152
|
+
|
153
|
+
if ((curPunc == ";" || curPunc == "{" || curPunc == "}") && state.ctx.type == "block") pop(state);
|
154
|
+
if (curPunc == "{") push(state, "}", stream);
|
155
|
+
else if (curPunc == "(") {
|
156
|
+
push(state, ")", stream);
|
157
|
+
if (state.afterIdent) state.ctx.argList = true;
|
158
|
+
}
|
159
|
+
else if (curPunc == "[") push(state, "]", stream);
|
160
|
+
else if (curPunc == "block") push(state, "block", stream);
|
161
|
+
else if (curPunc == state.ctx.type) pop(state);
|
162
|
+
else if (state.ctx.type == "block" && style != "comment") setFlag(state, BRACELESS)
|
163
|
+
state.afterIdent = style == "variable" || style == "keyword";
|
164
|
+
return style;
|
165
|
+
},
|
166
|
+
|
167
|
+
indent: function(state, textAfter) {
|
168
|
+
if (state.tokenize != tokenBase) return 0;
|
169
|
+
var firstChar = textAfter && textAfter.charAt(0), ctx = state.ctx,
|
170
|
+
closing = firstChar == ctx.type;
|
171
|
+
if (ctx.flags & BRACELESS) ctx = ctx.prev
|
172
|
+
if (ctx.type == "block") return ctx.indent + (firstChar == "{" ? 0 : config.indentUnit);
|
173
|
+
else if (ctx.flags & ALIGN_YES) return ctx.column + (closing ? 0 : 1);
|
174
|
+
else return ctx.indent + (closing ? 0 : config.indentUnit);
|
175
|
+
},
|
176
|
+
|
177
|
+
lineComment: "#"
|
178
|
+
};
|
179
|
+
});
|
180
|
+
|
181
|
+
CodeMirror.defineMIME("text/x-rsrc", "r");
|
182
|
+
|
183
|
+
});
|
@@ -0,0 +1,66 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
|
3
|
+
<title>CodeMirror: RPM changes mode</title>
|
4
|
+
<meta charset="utf-8"/>
|
5
|
+
<link rel=stylesheet href="../../doc/docs.css">
|
6
|
+
|
7
|
+
<link rel="stylesheet" href="../../../lib/codemirror.css">
|
8
|
+
<script src="../../../lib/codemirror.js"></script>
|
9
|
+
<script src="changes.js"></script>
|
10
|
+
<link rel="stylesheet" href="../../../doc/docs.css">
|
11
|
+
<style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
|
12
|
+
|
13
|
+
<div id=nav>
|
14
|
+
<a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../../doc/logo.png"></a>
|
15
|
+
|
16
|
+
<ul>
|
17
|
+
<li><a href="../../../index.html">Home</a>
|
18
|
+
<li><a href="../../../doc/manual.html">Manual</a>
|
19
|
+
<li><a href="https://github.com/codemirror/codemirror">Code</a>
|
20
|
+
</ul>
|
21
|
+
<ul>
|
22
|
+
<li><a href="../../index.html">Language modes</a>
|
23
|
+
<li><a class=active href="#">RPM changes</a>
|
24
|
+
</ul>
|
25
|
+
</div>
|
26
|
+
|
27
|
+
<article>
|
28
|
+
<h2>RPM changes mode</h2>
|
29
|
+
|
30
|
+
<div><textarea id="code" name="code">
|
31
|
+
-------------------------------------------------------------------
|
32
|
+
Tue Oct 18 13:58:40 UTC 2011 - misterx@example.com
|
33
|
+
|
34
|
+
- Update to r60.3
|
35
|
+
- Fixes bug in the reflect package
|
36
|
+
* disallow Interface method on Value obtained via unexported name
|
37
|
+
|
38
|
+
-------------------------------------------------------------------
|
39
|
+
Thu Oct 6 08:14:24 UTC 2011 - misterx@example.com
|
40
|
+
|
41
|
+
- Update to r60.2
|
42
|
+
- Fixes memory leak in certain map types
|
43
|
+
|
44
|
+
-------------------------------------------------------------------
|
45
|
+
Wed Oct 5 14:34:10 UTC 2011 - misterx@example.com
|
46
|
+
|
47
|
+
- Tweaks for gdb debugging
|
48
|
+
- go.spec changes:
|
49
|
+
- move %go_arch definition to %prep section
|
50
|
+
- pass correct location of go specific gdb pretty printer and
|
51
|
+
functions to cpp as HOST_EXTRA_CFLAGS macro
|
52
|
+
- install go gdb functions & printer
|
53
|
+
- gdb-printer.patch
|
54
|
+
- patch linker (src/cmd/ld/dwarf.c) to emit correct location of go
|
55
|
+
gdb functions and pretty printer
|
56
|
+
</textarea></div>
|
57
|
+
<script>
|
58
|
+
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
|
59
|
+
mode: {name: "changes"},
|
60
|
+
lineNumbers: true,
|
61
|
+
indentUnit: 4
|
62
|
+
});
|
63
|
+
</script>
|
64
|
+
|
65
|
+
<p><strong>MIME types defined:</strong> <code>text/x-rpm-changes</code>.</p>
|
66
|
+
</article>
|
@@ -0,0 +1,109 @@
|
|
1
|
+
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
2
|
+
// Distributed under an MIT license: http://codemirror.net/LICENSE
|
3
|
+
|
4
|
+
(function(mod) {
|
5
|
+
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
6
|
+
mod(require("../../lib/codemirror"));
|
7
|
+
else if (typeof define == "function" && define.amd) // AMD
|
8
|
+
define(["../../lib/codemirror"], mod);
|
9
|
+
else // Plain browser env
|
10
|
+
mod(CodeMirror);
|
11
|
+
})(function(CodeMirror) {
|
12
|
+
"use strict";
|
13
|
+
|
14
|
+
CodeMirror.defineMode("rpm-changes", function() {
|
15
|
+
var headerSeperator = /^-+$/;
|
16
|
+
var headerLine = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ?\d{1,2} \d{2}:\d{2}(:\d{2})? [A-Z]{3,4} \d{4} - /;
|
17
|
+
var simpleEmail = /^[\w+.-]+@[\w.-]+/;
|
18
|
+
|
19
|
+
return {
|
20
|
+
token: function(stream) {
|
21
|
+
if (stream.sol()) {
|
22
|
+
if (stream.match(headerSeperator)) { return 'tag'; }
|
23
|
+
if (stream.match(headerLine)) { return 'tag'; }
|
24
|
+
}
|
25
|
+
if (stream.match(simpleEmail)) { return 'string'; }
|
26
|
+
stream.next();
|
27
|
+
return null;
|
28
|
+
}
|
29
|
+
};
|
30
|
+
});
|
31
|
+
|
32
|
+
CodeMirror.defineMIME("text/x-rpm-changes", "rpm-changes");
|
33
|
+
|
34
|
+
// Quick and dirty spec file highlighting
|
35
|
+
|
36
|
+
CodeMirror.defineMode("rpm-spec", function() {
|
37
|
+
var arch = /^(i386|i586|i686|x86_64|ppc64le|ppc64|ppc|ia64|s390x|s390|sparc64|sparcv9|sparc|noarch|alphaev6|alpha|hppa|mipsel)/;
|
38
|
+
|
39
|
+
var preamble = /^[a-zA-Z0-9()]+:/;
|
40
|
+
var section = /^%(debug_package|package|description|prep|build|install|files|clean|changelog|preinstall|preun|postinstall|postun|pretrans|posttrans|pre|post|triggerin|triggerun|verifyscript|check|triggerpostun|triggerprein|trigger)/;
|
41
|
+
var control_flow_complex = /^%(ifnarch|ifarch|if)/; // rpm control flow macros
|
42
|
+
var control_flow_simple = /^%(else|endif)/; // rpm control flow macros
|
43
|
+
var operators = /^(\!|\?|\<\=|\<|\>\=|\>|\=\=|\&\&|\|\|)/; // operators in control flow macros
|
44
|
+
|
45
|
+
return {
|
46
|
+
startState: function () {
|
47
|
+
return {
|
48
|
+
controlFlow: false,
|
49
|
+
macroParameters: false,
|
50
|
+
section: false
|
51
|
+
};
|
52
|
+
},
|
53
|
+
token: function (stream, state) {
|
54
|
+
var ch = stream.peek();
|
55
|
+
if (ch == "#") { stream.skipToEnd(); return "comment"; }
|
56
|
+
|
57
|
+
if (stream.sol()) {
|
58
|
+
if (stream.match(preamble)) { return "header"; }
|
59
|
+
if (stream.match(section)) { return "atom"; }
|
60
|
+
}
|
61
|
+
|
62
|
+
if (stream.match(/^\$\w+/)) { return "def"; } // Variables like '$RPM_BUILD_ROOT'
|
63
|
+
if (stream.match(/^\$\{\w+\}/)) { return "def"; } // Variables like '${RPM_BUILD_ROOT}'
|
64
|
+
|
65
|
+
if (stream.match(control_flow_simple)) { return "keyword"; }
|
66
|
+
if (stream.match(control_flow_complex)) {
|
67
|
+
state.controlFlow = true;
|
68
|
+
return "keyword";
|
69
|
+
}
|
70
|
+
if (state.controlFlow) {
|
71
|
+
if (stream.match(operators)) { return "operator"; }
|
72
|
+
if (stream.match(/^(\d+)/)) { return "number"; }
|
73
|
+
if (stream.eol()) { state.controlFlow = false; }
|
74
|
+
}
|
75
|
+
|
76
|
+
if (stream.match(arch)) {
|
77
|
+
if (stream.eol()) { state.controlFlow = false; }
|
78
|
+
return "number";
|
79
|
+
}
|
80
|
+
|
81
|
+
// Macros like '%make_install' or '%attr(0775,root,root)'
|
82
|
+
if (stream.match(/^%[\w]+/)) {
|
83
|
+
if (stream.match(/^\(/)) { state.macroParameters = true; }
|
84
|
+
return "keyword";
|
85
|
+
}
|
86
|
+
if (state.macroParameters) {
|
87
|
+
if (stream.match(/^\d+/)) { return "number";}
|
88
|
+
if (stream.match(/^\)/)) {
|
89
|
+
state.macroParameters = false;
|
90
|
+
return "keyword";
|
91
|
+
}
|
92
|
+
}
|
93
|
+
|
94
|
+
// Macros like '%{defined fedora}'
|
95
|
+
if (stream.match(/^%\{\??[\w \-\:\!]+\}/)) {
|
96
|
+
if (stream.eol()) { state.controlFlow = false; }
|
97
|
+
return "def";
|
98
|
+
}
|
99
|
+
|
100
|
+
//TODO: Include bash script sub-parser (CodeMirror supports that)
|
101
|
+
stream.next();
|
102
|
+
return null;
|
103
|
+
}
|
104
|
+
};
|
105
|
+
});
|
106
|
+
|
107
|
+
CodeMirror.defineMIME("text/x-rpm-spec", "rpm-spec");
|
108
|
+
|
109
|
+
});
|