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

Commit

Permalink
Move filename to end of the programlisting
Browse files Browse the repository at this point in the history
  • Loading branch information
xuhongxu96 committed Aug 24, 2021
1 parent b6d569f commit 0e4ccdf
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/Doxybook/TextMarkdownPrinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,6 @@ void Doxybook2::TextMarkdownPrinter::print(PrintData& data,
data.ss << "```" << normalizeLanguage(language);
newline();
} else {
auto i = node->extra.find_last_of('.');
if (i != 0) {
// If it's not only the extension name, output the filename
data.ss << "_Filename: " << node->extra << "_";
newline();
newline();
}
if (i != std::string::npos) {
data.ss << "```" << normalizeLanguage(node->extra.substr(i + 1));
newline();
Expand Down Expand Up @@ -435,6 +428,12 @@ void Doxybook2::TextMarkdownPrinter::print(PrintData& data,
data.ss << "```";
newline();
newline();
if (!node->extra.empty() && node->extra.find_last_of('.') != 0) {
// If it's not only the extension name, output the filename
data.ss << "_Filename: " << node->extra << "_";
newline();
newline();
}
data.eol = true;
break;
}
Expand Down

0 comments on commit 0e4ccdf

Please # to comment.