Skip to content

Commit ed87560

Browse files
committed
Problem jumping to line number in source code due to wrong hypertarget name
When having a line like "Definition at line 30 of file test.cpp." in the LaTeX document with source code the test.cpp is linked to the file but the 30 isn't (in HTML it is). Problem is that in the hypertarget the extension is still present. This patch corrects this.
1 parent 41e7143 commit ed87560

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/latexgen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ void LatexCodeGenerator::writeLineNumber(const char *ref,const char *fileName,co
199199
{
200200
QCString lineAnchor;
201201
lineAnchor.sprintf("_l%05d",l);
202-
lineAnchor.prepend(m_sourceFileName);
202+
lineAnchor.prepend(stripExtensionGeneral(m_sourceFileName, ".tex"));
203203
//if (!m_prettyCode) return;
204204
if (usePDFLatex && pdfHyperlinks)
205205
{

0 commit comments

Comments
 (0)