Skip to content

Commit aaa2081

Browse files
committed
fix #4208
1 parent ce9e4d3 commit aaa2081

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/latexparser/latextokens.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ QSet<Token::TokenType> Token::tkSingleArg()
244244
result.insert(beamertheme);
245245
result.insert(def);
246246
result.insert(overlay);
247+
result.insert(newTheorem);
247248
result.insert(defSpecialArg);
248249
return result;
249250
}

src/tests/syntaxcheck_t.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,10 @@ void SyntaxCheckTest::checkkeyval_data(){
286286
<<"\\usepackage{thm-kv} \\declaretheorem[numbered=unles unique]{test}"<<true;
287287
QTest::newRow("thmtools,multi word keyval,fault in second")
288288
<<"\\usepackage{thm-kv} \\declaretheorem[numbered=unless unque]{test}"<<true;
289+
QTest::newRow("newtheorem, flagged")
290+
<<"\\newtheorem{test}{abc}\\begin{tet}\\end{tet}"<<true;
291+
QTest::newRow("newtheorem, correct")
292+
<<"\\newtheorem{test}{abc}\\begin{test}\\end{test}"<<false;
289293

290294
}
291295

0 commit comments

Comments
 (0)