Skip to content

Commit d8e7438

Browse files
committed
Small logic fix for cite with only nopar or nocite option
1 parent 0462d3a commit d8e7438

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/cite.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ class CiteInfoOption
2929
static CiteInfoOption makeNumber() { return CiteInfoOption(NUMBER); }
3030
static CiteInfoOption makeShortAuthor() { return CiteInfoOption(SHORTAUTHOR); }
3131
static CiteInfoOption makeYear() { return CiteInfoOption(YEAR); }
32+
33+
void changeToNumber() { m_bits = (m_bits & OptionMask) | NUMBER; }
3234
void setNoPar() { m_bits |= NOPAR_BIT; }
3335
void setNoCite() { m_bits |= NOCITE_BIT; }
3436

src/docnode.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3384,7 +3384,7 @@ void DocPara::handleCite(char cmdChar,const QCString &cmdName)
33843384
}
33853385
}
33863386

3387-
if (option.isUnknown()) option = CiteInfoOption::makeNumber();
3387+
if (option.isUnknown()) option.changeToNumber();
33883388

33893389
parser()->tokenizer.setStatePara();
33903390
tok=parser()->tokenizer.lex();

0 commit comments

Comments
 (0)