Add config variable to process backslashes as letters
This commit is contained in:
parent
0aa6e3ca75
commit
bdc8d3eb38
@ -394,6 +394,7 @@ bool RclConfig::updateMainConfig()
|
||||
|
||||
setKeyDir(cstr_null);
|
||||
|
||||
// Texsplit customization
|
||||
bool bvalue = false;
|
||||
if (getConfParam("nocjk", &bvalue) && bvalue == true) {
|
||||
TextSplit::cjkProcessing(false);
|
||||
@ -405,16 +406,18 @@ bool RclConfig::updateMainConfig()
|
||||
TextSplit::cjkProcessing(true);
|
||||
}
|
||||
}
|
||||
|
||||
bvalue = false;
|
||||
if (getConfParam("nonumbers", &bvalue) && bvalue == true) {
|
||||
TextSplit::noNumbers();
|
||||
}
|
||||
|
||||
bvalue = false;
|
||||
if (getConfParam("dehyphenate", &bvalue)) {
|
||||
TextSplit::deHyphenate(bvalue);
|
||||
}
|
||||
bvalue = false;
|
||||
if (getConfParam("backslashasletter", &bvalue)) {
|
||||
TextSplit::backslashAsLetter(bvalue);
|
||||
}
|
||||
|
||||
bvalue = true;
|
||||
if (getConfParam("skippedPathsFnmPathname", &bvalue) && bvalue == false) {
|
||||
|
||||
@ -137,6 +137,14 @@ public:
|
||||
};
|
||||
static const CharClassInit charClassInitInstance;
|
||||
|
||||
void TextSplit::backslashAsLetter(bool on) {
|
||||
if (on) {
|
||||
charclasses[int('\\')] = A_LLETTER;
|
||||
} else {
|
||||
charclasses[int('\\')] = SPACE;
|
||||
}
|
||||
}
|
||||
|
||||
static inline int whatcc(unsigned int c)
|
||||
{
|
||||
if (c <= 127) {
|
||||
|
||||
@ -59,6 +59,11 @@ public:
|
||||
o_deHyphenate = on;
|
||||
}
|
||||
|
||||
// Process backslashes as letters? Default is off, but it may be
|
||||
// useful for searching for tex commands. Config variable:
|
||||
// backslashasletter
|
||||
static void backslashAsLetter(bool on);
|
||||
|
||||
enum Flags {
|
||||
// Default: will return spans and words (a_b, a, b)
|
||||
TXTS_NONE = 0,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user