summaryrefslogtreecommitdiff
path: root/codemirror_ui/lib/CodeMirror-2.3/mode/rpm/changes
diff options
context:
space:
mode:
Diffstat (limited to 'codemirror_ui/lib/CodeMirror-2.3/mode/rpm/changes')
-rw-r--r--codemirror_ui/lib/CodeMirror-2.3/mode/rpm/changes/changes.js19
-rw-r--r--codemirror_ui/lib/CodeMirror-2.3/mode/rpm/changes/index.html53
2 files changed, 72 insertions, 0 deletions
diff --git a/codemirror_ui/lib/CodeMirror-2.3/mode/rpm/changes/changes.js b/codemirror_ui/lib/CodeMirror-2.3/mode/rpm/changes/changes.js
new file mode 100644
index 0000000..cb45f9e
--- /dev/null
+++ b/codemirror_ui/lib/CodeMirror-2.3/mode/rpm/changes/changes.js
@@ -0,0 +1,19 @@
+CodeMirror.defineMode("changes", function(config, modeConfig) {
+ var headerSeperator = /^-+$/;
+ 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} - /;
+ var simpleEmail = /^[\w+.-]+@[\w.-]+/;
+
+ return {
+ token: function(stream) {
+ if (stream.sol()) {
+ if (stream.match(headerSeperator)) { return 'tag'; }
+ if (stream.match(headerLine)) { return 'tag'; }
+ }
+ if (stream.match(simpleEmail)) { return 'string'; }
+ stream.next();
+ return null;
+ }
+ };
+});
+
+CodeMirror.defineMIME("text/x-rpm-changes", "changes");
diff --git a/codemirror_ui/lib/CodeMirror-2.3/mode/rpm/changes/index.html b/codemirror_ui/lib/CodeMirror-2.3/mode/rpm/changes/index.html
new file mode 100644
index 0000000..b7ff952
--- /dev/null
+++ b/codemirror_ui/lib/CodeMirror-2.3/mode/rpm/changes/index.html
@@ -0,0 +1,53 @@
+<!doctype html>
+<html>
+ <head>
+ <title>CodeMirror: RPM changes mode</title>
+ <link rel="stylesheet" href="../../../lib/codemirror.css">
+ <script src="../../../lib/codemirror.js"></script>
+ <script src="changes.js"></script>
+ <link rel="stylesheet" href="../../../doc/docs.css">
+ <style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
+ </head>
+ <body>
+ <h1>CodeMirror: RPM changes mode</h1>
+
+ <div><textarea id="code" name="code">
+-------------------------------------------------------------------
+Tue Oct 18 13:58:40 UTC 2011 - misterx@example.com
+
+- Update to r60.3
+- Fixes bug in the reflect package
+ * disallow Interface method on Value obtained via unexported name
+
+-------------------------------------------------------------------
+Thu Oct 6 08:14:24 UTC 2011 - misterx@example.com
+
+- Update to r60.2
+- Fixes memory leak in certain map types
+
+-------------------------------------------------------------------
+Wed Oct 5 14:34:10 UTC 2011 - misterx@example.com
+
+- Tweaks for gdb debugging
+- go.spec changes:
+ - move %go_arch definition to %prep section
+ - pass correct location of go specific gdb pretty printer and
+ functions to cpp as HOST_EXTRA_CFLAGS macro
+ - install go gdb functions & printer
+- gdb-printer.patch
+ - patch linker (src/cmd/ld/dwarf.c) to emit correct location of go
+ gdb functions and pretty printer
+</textarea></div>
+ <script>
+ var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
+ mode: {name: "changes"},
+ lineNumbers: true,
+ indentUnit: 4,
+ tabMode: "shift",
+ matchBrackets: true
+ });
+ </script>
+
+ <p><strong>MIME types defined:</strong> <code>text/x-rpm-changes</code>.</p>
+ </body>
+</html>