diff options
-rw-r--r-- | doc/sciteco.7.template | 13 | ||||
-rw-r--r-- | src/parser.cpp | 4 |
2 files changed, 16 insertions, 1 deletions
diff --git a/doc/sciteco.7.template b/doc/sciteco.7.template index 00c8366..a342f5d 100644 --- a/doc/sciteco.7.template +++ b/doc/sciteco.7.template @@ -1296,9 +1296,20 @@ Like in pattern matching, a symbol constituent is defined as an alpha-numeric character, dot, dollar or underscore. .TP .IB n \(dqD -Applies if \fIn\fP is the code a digit character (0 to 9). +Applies if \fIn\fP is the code of a digit character (0 to 9). The current radix is insignificant. .TP +.IB n \(dqI +Applies if \fIn\fP is the code of a directory separator +(e.g. \(lq/\(rq on UNIX, \(lq\\\(rq or \(lq/\(rq on Windows). +This is useful for macros that have to work with different +separator styles in a portable manner. +Note that, \*(ST itself is designed not to produce non-forward-slash +separators and at least allows the user to generate forward-slashes +in portable macros. +This is not the case, for instance when working with environment +variables. +.TP .IB n \(dqS .TQ .IB n \(dqT diff --git a/src/parser.cpp b/src/parser.cpp index 1514e24..2a83a66 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -1602,6 +1602,10 @@ StateCondCommand::custom(gchar chr) BEGIN_EXEC(&States::start); result = g_ascii_isdigit((gchar)value); break; + case 'I': + BEGIN_EXEC(&States::start); + result = G_IS_DIR_SEPARATOR((gchar)value); + break; case 'S': case 'T': BEGIN_EXEC(&States::start); |