1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 16:51:15 +02:00

Use HintFmt for doc comments

This commit is contained in:
Robert Hensing 2024-07-15 19:55:01 +02:00
parent 6a125e65d0
commit ce31a0457f
2 changed files with 6 additions and 6 deletions

View file

@ -668,12 +668,12 @@ ProcessLineResult NixRepl::processLine(std::string line)
logger->cout(trim(renderMarkdownToTerminal(markdown)));
} else if (fallbackPos) {
std::stringstream ss;
ss << "Attribute `" << fallbackName << "`\n\n";
ss << " … defined at " << state->positions[fallbackPos] << "\n\n";
ss << HintFmt("Attribute '%1%'", fallbackName) << "\n\n";
ss << HintFmt(" … defined at %1%", state->positions[fallbackPos]) << "\n\n";
if (fallbackDoc) {
ss << fallbackDoc.getInnerText(state->positions);
} else {
ss << "No documentation found.\n\n";
ss << HintFmt("No documentation found.") << "\n\n";
}
auto markdown = ss.str();