mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 11:26:15 +01:00
ckeditor 5.60.0
This commit is contained in:
8
libraries/codemirror/mode/rpm/rpm.js
vendored
8
libraries/codemirror/mode/rpm/rpm.js
vendored
@@ -12,14 +12,14 @@
|
||||
"use strict";
|
||||
|
||||
CodeMirror.defineMode("rpm-changes", function() {
|
||||
var headerSeperator = /^-+$/;
|
||||
var headerSeparator = /^-+$/;
|
||||
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(headerSeparator)) { return 'tag'; }
|
||||
if (stream.match(headerLine)) { return 'tag'; }
|
||||
}
|
||||
if (stream.match(simpleEmail)) { return 'string'; }
|
||||
@@ -80,12 +80,12 @@ CodeMirror.defineMode("rpm-spec", function() {
|
||||
|
||||
// Macros like '%make_install' or '%attr(0775,root,root)'
|
||||
if (stream.match(/^%[\w]+/)) {
|
||||
if (stream.match(/^\(/)) { state.macroParameters = true; }
|
||||
if (stream.match('(')) { state.macroParameters = true; }
|
||||
return "keyword";
|
||||
}
|
||||
if (state.macroParameters) {
|
||||
if (stream.match(/^\d+/)) { return "number";}
|
||||
if (stream.match(/^\)/)) {
|
||||
if (stream.match(')')) {
|
||||
state.macroParameters = false;
|
||||
return "keyword";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user