Skip to content

Commit a0fcf5a

Browse files
authored
Merge pull request doxygen#12208 from albert-github/feature/bug_latex_line
Unnecessary line break signs in LaTeX
2 parents c9905aa + e51f8c3 commit a0fcf5a

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/latexgen.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2450,9 +2450,9 @@ void filterLatexString(TextStream &t,const QCString &str,
24502450
}
24512451
break;
24522452
case '*': processEntity(t,pdfHyperlinks,"$\\ast$","*"); break;
2453-
case '_': if (!insideTabbing) t << "\\+";
2453+
case '_': if (!insideTabbing && *p) t << "\\+";
24542454
t << "\\_";
2455-
if (!insideTabbing) t << "\\+";
2455+
if (!insideTabbing && *p) t << "\\+";
24562456
break;
24572457
case '{': t << "\\{"; break;
24582458
case '}': t << "\\}"; break;
@@ -2466,7 +2466,7 @@ void filterLatexString(TextStream &t,const QCString &str,
24662466
t << "[";
24672467
break;
24682468
case ']': if (pc=='[') t << "$\\,$";
2469-
if (Config_getBool(PDF_HYPERLINKS) || insideItem)
2469+
if ((Config_getBool(PDF_HYPERLINKS) || insideItem) && *p)
24702470
t << "]\\+";
24712471
else
24722472
t << "]";
@@ -2510,7 +2510,7 @@ void filterLatexString(TextStream &t,const QCString &str,
25102510
{
25112511
t << static_cast<char>(c);
25122512
}
2513-
if (!insideTabbing && ((c==':' && *p!=':') || c=='/'))
2513+
if (!insideTabbing && *p && ((c==':' && *p!=':') || c=='/'))
25142514
{
25152515
t << "\\+";
25162516
}

0 commit comments

Comments
 (0)