Skip to content

Commit

Permalink
fix #3377
Browse files Browse the repository at this point in the history
  • Loading branch information
sunderme committed Nov 19, 2023
1 parent a13384f commit 4b2c616
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/latexdocument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1082,7 +1082,9 @@ void LatexDocument::reinterpretCommandArguments(HandledData &changedCommands)
}
}
bool skipRecheck=dlh->hasFlag(QDocumentLine::argumentsParsed);
changedCommands.removedUsepackages << mUsepackageList.values(dlh); // make already interpreted usepakages known
if(!dlh->hasFlag(QDocumentLine::argumentsParsed)){
removeLineElements(dlh,changedCommands);
}
interpretCommandArguments(dlh,i,changedCommands,false,docStructureIter);
if (edView && !skipRecheck){
edView->documentContentChanged(i, 1);
Expand Down
7 changes: 5 additions & 2 deletions src/latexparser/latexparsing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,11 @@ bool latexDetermineContexts2(QDocumentLineHandle *dlh, TokenStack &stack, Comman
}
} else {
if(tk.type==Token::command && tk.subtype == Token::none){
tk.type = Token::commandUnknown;
unknownCommandsPresent=true;
if(command!="\\\\"){
// skip "\\"
tk.type = Token::commandUnknown;
unknownCommandsPresent=true;
}
}
}
lexed << tk;
Expand Down

0 comments on commit 4b2c616

Please sign in to comment.