Skip to content
This repository has been archived by the owner on Oct 20, 2022. It is now read-only.

Commit

Permalink
Merge pull request #50 from brycelelbach/omit-href-for-objects-withou…
Browse files Browse the repository at this point in the history
…t-urls-in-link-and-inline-code-as-html-mode

Omit `href="..."` for links with no URL in `linkAndInlineCodeAsHTML` mode
  • Loading branch information
matusnovak authored Jun 25, 2021
2 parents d18d2f4 + 13677ad commit da829b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Doxybook/TextMarkdownPrinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ void Doxybook2::TextMarkdownPrinter::print(PrintData& data,
case XmlTextParser::Node::Type::REF: {
if (config.linkAndInlineCodeAsHTML) {
const auto found = doxygen.getCache().find(node->extra);
if (found != doxygen.getCache().end()) {
if (found != doxygen.getCache().end() && !found->second->getUrl().empty()) {
data.ss << "<a href=\"" << found->second->getUrl() << "\">";
data.validLink = true;
}
Expand Down

0 comments on commit da829b1

Please # to comment.