diff options
author | Valerio Virgillito | 2012-02-15 17:04:39 -0800 |
---|---|---|
committer | Valerio Virgillito | 2012-02-15 17:04:39 -0800 |
commit | fe71cb9aa1700199c0089166ad54fc56eb760644 (patch) | |
tree | b0c7c24b1f45a079e1c09312ca716e3d35aecad4 /imports/codemirror/mode/rpm/changes | |
parent | 747616980cad14f0b65fbcc7f497ed9680a39d29 (diff) | |
parent | d366c0bd1af6471511217ed574083e15059519b5 (diff) | |
download | ninja-fe71cb9aa1700199c0089166ad54fc56eb760644.tar.gz |
Merge branch 'refs/heads/master' into components
Diffstat (limited to 'imports/codemirror/mode/rpm/changes')
-rwxr-xr-x | imports/codemirror/mode/rpm/changes/changes.js | 19 | ||||
-rwxr-xr-x | imports/codemirror/mode/rpm/changes/index.html | 53 |
2 files changed, 72 insertions, 0 deletions
diff --git a/imports/codemirror/mode/rpm/changes/changes.js b/imports/codemirror/mode/rpm/changes/changes.js new file mode 100755 index 00000000..cb45f9e5 --- /dev/null +++ b/imports/codemirror/mode/rpm/changes/changes.js | |||
@@ -0,0 +1,19 @@ | |||
1 | CodeMirror.defineMode("changes", function(config, modeConfig) { | ||
2 | var headerSeperator = /^-+$/; | ||
3 | 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} - /; | ||
4 | var simpleEmail = /^[\w+.-]+@[\w.-]+/; | ||
5 | |||
6 | return { | ||
7 | token: function(stream) { | ||
8 | if (stream.sol()) { | ||
9 | if (stream.match(headerSeperator)) { return 'tag'; } | ||
10 | if (stream.match(headerLine)) { return 'tag'; } | ||
11 | } | ||
12 | if (stream.match(simpleEmail)) { return 'string'; } | ||
13 | stream.next(); | ||
14 | return null; | ||
15 | } | ||
16 | }; | ||
17 | }); | ||
18 | |||
19 | CodeMirror.defineMIME("text/x-rpm-changes", "changes"); | ||
diff --git a/imports/codemirror/mode/rpm/changes/index.html b/imports/codemirror/mode/rpm/changes/index.html new file mode 100755 index 00000000..b7ff952d --- /dev/null +++ b/imports/codemirror/mode/rpm/changes/index.html | |||
@@ -0,0 +1,53 @@ | |||
1 | <!doctype html> | ||
2 | <html> | ||
3 | <head> | ||
4 | <title>CodeMirror: RPM changes mode</title> | ||
5 | <link rel="stylesheet" href="../../../lib/codemirror.css"> | ||
6 | <script src="../../../lib/codemirror.js"></script> | ||
7 | <script src="changes.js"></script> | ||
8 | <link rel="stylesheet" href="../../../doc/docs.css"> | ||
9 | <style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style> | ||
10 | </head> | ||
11 | <body> | ||
12 | <h1>CodeMirror: RPM changes mode</h1> | ||
13 | |||
14 | <div><textarea id="code" name="code"> | ||
15 | ------------------------------------------------------------------- | ||
16 | Tue Oct 18 13:58:40 UTC 2011 - misterx@example.com | ||
17 | |||
18 | - Update to r60.3 | ||
19 | - Fixes bug in the reflect package | ||
20 | * disallow Interface method on Value obtained via unexported name | ||
21 | |||
22 | ------------------------------------------------------------------- | ||
23 | Thu Oct 6 08:14:24 UTC 2011 - misterx@example.com | ||
24 | |||
25 | - Update to r60.2 | ||
26 | - Fixes memory leak in certain map types | ||
27 | |||
28 | ------------------------------------------------------------------- | ||
29 | Wed Oct 5 14:34:10 UTC 2011 - misterx@example.com | ||
30 | |||
31 | - Tweaks for gdb debugging | ||
32 | - go.spec changes: | ||
33 | - move %go_arch definition to %prep section | ||
34 | - pass correct location of go specific gdb pretty printer and | ||
35 | functions to cpp as HOST_EXTRA_CFLAGS macro | ||
36 | - install go gdb functions & printer | ||
37 | - gdb-printer.patch | ||
38 | - patch linker (src/cmd/ld/dwarf.c) to emit correct location of go | ||
39 | gdb functions and pretty printer | ||
40 | </textarea></div> | ||
41 | <script> | ||
42 | var editor = CodeMirror.fromTextArea(document.getElementById("code"), { | ||
43 | mode: {name: "changes"}, | ||
44 | lineNumbers: true, | ||
45 | indentUnit: 4, | ||
46 | tabMode: "shift", | ||
47 | matchBrackets: true | ||
48 | }); | ||
49 | </script> | ||
50 | |||
51 | <p><strong>MIME types defined:</strong> <code>text/x-rpm-changes</code>.</p> | ||
52 | </body> | ||
53 | </html> | ||