mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-18 08:35:48 +01:00
Allow \c/\C in regexp options and so forth.
This commit is contained in:
@@ -406,12 +406,14 @@ var Highlights = Module("Highlight", {
|
||||
completion: function (dactyl, modules) {
|
||||
const { completion, config, io } = modules;
|
||||
completion.colorScheme = function colorScheme(context) {
|
||||
let extRe = RegExp("\\." + config.fileExtension + "$");
|
||||
|
||||
context.title = ["Color Scheme", "Runtime Path"];
|
||||
context.keys = { text: function (f) f.leafName.replace(RegExp("\\." + config.fileExtension + "$"), ""), description: ".parent.path" };
|
||||
context.keys = { text: function (f) f.leafName.replace(extRe, ""), description: ".parent.path" };
|
||||
context.completions = array.flatten(
|
||||
io.getRuntimeDirectories("colors").map(
|
||||
function (dir) dir.readDirectory().filter(
|
||||
function (file) RegExp("\\." + config.fileExtension + "$").test(file.leafName))));
|
||||
function (file) extRe.test(file.leafName))));
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user