[Bug?] The same incorrect sorting syntax doesn't raise syntax error when specified at folder level #232
-
|
Compare these two examples of invalid syntax: ---
sorting-spec: |
target-folder: dummy
> modified, created
------
sorting-spec: |
target-folder: dummy
> modified, created
---The latter doesn't generate syntax error. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
SummaryIn a nutshell: the sorting direction specification (e.g. For the same reason, the secondary sorting specification doesn't need the sorting direction prefix - if the order prefix is not provided, the ascending direction is assumed. Relevant examplesSyntax error because a nested sorting specification requires prior group definitionNote the additional indentation in ---
sorting-spec: |
target-folder: dummy
> modified, created
---Perfectly valid two-level sorting specification for the folderNote no additional indentation in
---
sorting-spec: |
target-folder: dummy
> modified, created
--- |
Beta Was this translation helpful? Give feedback.
Summary
In a nutshell: the sorting direction specification (e.g.
<,>,asc:,desc:,order-asc:, ...) is required only at the beginning of a line, to recognize the line as a sorting specification - no direction specification at the beginning of a line results in treating the line as a regular group definition to match files and/or folder.For the same reason, the secondary sorting specification doesn't need the sorting direction prefix - if the order prefix is not provided, the ascending direction is assumed.
Relevant examples
Syntax error because a nested sorting specification requires prior group definition
Note the additional indentation in
> modified, created