diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2019-12-10 20:20:54 (GMT) |
---|---|---|
committer | Dimitri van Heesch <doxygen@gmail.com> | 2019-12-10 20:20:54 (GMT) |
commit | 994b081aac309954a7984929329fbcd5c5cf8883 (patch) | |
tree | fe12b6a8b2e721b46ef87c99f7862af9501710db | |
parent | a0c75e4c7a7aef5a1e8cec56a1f909eac44af3e9 (diff) | |
download | Doxygen-994b081aac309954a7984929329fbcd5c5cf8883.zip Doxygen-994b081aac309954a7984929329fbcd5c5cf8883.tar.gz Doxygen-994b081aac309954a7984929329fbcd5c5cf8883.tar.bz2 |
issue #7412: HTML: Opening a reference link in a new tab does not scroll to the content
-rw-r--r-- | src/htmlgen.cpp | 9 | ||||
-rw-r--r-- | src/scanner.l | 7 | ||||
-rw-r--r-- | templates/html/resize.js | 1 |
3 files changed, 8 insertions, 9 deletions
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index df39d32..19a1869 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -300,12 +300,7 @@ static QCString substituteHtmlKeywords(const QCString &s, treeViewCssJs = "<link href=\"$relpath^navtree.css\" rel=\"stylesheet\" type=\"text/css\"/>\n" "<script type=\"text/javascript\" src=\"$relpath^resize.js\"></script>\n" "<script type=\"text/javascript\" src=\"$relpath^navtreedata.js\"></script>\n" - "<script type=\"text/javascript\" src=\"$relpath^navtree.js\"></script>\n" - "<script type=\"text/javascript\">\n" - "/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */\n" - " $(document).ready(initResizable);\n" - "/* @license-end */" - "</script>"; + "<script type=\"text/javascript\" src=\"$relpath^navtree.js\"></script>\n"; } if (searchEngine) @@ -2372,7 +2367,7 @@ QCString HtmlGenerator::writeSplitBarAsString(const char *name,const char *relpa "$(document).ready(function(){initNavTree('") + QCString(name) + Doxygen::htmlFileExtension + QCString("','") + relpath + - QCString("');});\n" + QCString("'); initResizable(); });\n" "/* @license-end */\n" "</script>\n" "<div id=\"doc-content\">\n"); diff --git a/src/scanner.l b/src/scanner.l index 0e3aeb0..7115129 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -1941,6 +1941,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) } } <CopyHereDocEnd>\n { + lineCount(yyscanner); *yyextra->pCopyHereDocGString += yytext; } <CopyHereDocEnd>{ID} { @@ -7186,10 +7187,12 @@ static void parseMain(yyscan_t yyscanner, //depthIf = 0; yyextra->protection = Public; yyextra->mtype = Method; - yyextra->stat = FALSE; + yyextra->stat = FALSE; yyextra->virt = Normal; yyextra->current_root = rt; - yyextra->yyLineNr= 1 ; + yyextra->yyLineNr = 1 ; + yyextra->yyBegLineNr = 1; + yyextra->yyBegColNr = 0; yyextra->yyFileName = fileName; setContext(yyscanner); bool processWithClang = yyextra->insideCpp || yyextra->insideObjC; diff --git a/templates/html/resize.js b/templates/html/resize.js index f5291d9..a0bb5f4 100644 --- a/templates/html/resize.js +++ b/templates/html/resize.js @@ -91,6 +91,7 @@ function initResizable() } collapsedWidth=width; } + (document.getElementById(location.hash.slice(1))||document.body).scrollIntoView(); } function collapseExpand() |