Sorting spec syntax refinement to allow one-liners like: sorting-spec: \< a-z

This commit is contained in:
SebastianMC 2022-10-07 12:02:16 +02:00
parent 9dbd9fdd03
commit 1915d59cf9
2 changed files with 5 additions and 3 deletions

View File

@ -95,12 +95,12 @@ target-folder: Sandbox
> created
target-folder: Abcd efgh ijk
> a-z
\> a-z
Plain text spec bla bla bla (matches files and folders)...
/:files files only matching
> a-z
/folders folders only matching
< a-z
\< a-z
% some-file (or folder)
/:files. sort....md
% Trailer item

View File

@ -148,7 +148,9 @@ const AttrLexems: { [key: string]: Attribute } = {
// Concise abbreviated equivalents
'::::': Attribute.TargetFolder,
'<': Attribute.OrderAsc,
'>': Attribute.OrderDesc
'\\<': Attribute.OrderAsc, // to allow single-liners in YAML
'>': Attribute.OrderDesc,
'\\>': Attribute.OrderDesc // to allow single-liners in YAML
}
const CURRENT_FOLDER_SYMBOL: string = '.'