From 7fce2a70fac2d52079572f60342094d44331af78 Mon Sep 17 00:00:00 2001 From: albert-github Date: Thu, 22 Apr 2021 14:37:17 +0200 Subject: No warning for incorrect ALIASES When having the alias: ``` "\latexonly mytable=\\mytable \endlatexonly" ``` the 1.9.1. version gave a warning: ``` error: Illegal ALIASES format '\latexonly mytable=\\mytable \endlatexonly'. Use "name=value" or "name{n}=value", where n is the number of arguments ``` though the current version doesn't give a warning, probably due to the regexp replacement. Now most likely the string found starts at `mytable=` The alias should start at the beginning of the string when searching. --- src/configimpl.l | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/configimpl.l b/src/configimpl.l index cae157b..b01ad38 100644 --- a/src/configimpl.l +++ b/src/configimpl.l @@ -1626,8 +1626,8 @@ void Config::checkAndCorrect() for (const auto &alias : aliasList) { // match aliases of the form re1='name=' and re2='name{2} =' - static const reg::Ex re1(R"(\a\w*\s*=)"); - static const reg::Ex re2(R"(\a\w*{\d+}\s*=)"); + static const reg::Ex re1(R"(^\a\w*\s*=)"); + static const reg::Ex re2(R"(^\a\w*{\d+}\s*=)"); if (!reg::search(alias,re1) && !reg::search(alias,re2)) { err("Illegal ALIASES format '%s'. Use \"name=value\" or \"name{n}=value\", where n is the number of arguments\n", -- cgit v0.12