From 77f069df4dcfd40a3d009f40e074ce1a5ac132c1 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Thu, 9 Dec 2010 19:38:01 +0100 Subject: Added hack to remove markup for opened comments at the end of snippets. --- tools/qdoc3/quoter.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/qdoc3/quoter.cpp b/tools/qdoc3/quoter.cpp index 6dc7894..84c6fb1 100644 --- a/tools/qdoc3/quoter.cpp +++ b/tools/qdoc3/quoter.cpp @@ -235,10 +235,14 @@ QString Quoter::quoteSnippet(const Location &docLocation, const QString &identif QString lastLine = getLine(); int dIndex = lastLine.indexOf(delimiter); if (dIndex > 0) { + // The delimiter might be preceded on the line by other + // delimeters, so look for the first comment on the line. QString leading = lastLine.left(dIndex); dIndex = leading.indexOf(comment); if (dIndex != -1) leading = leading.left(dIndex); + if (leading.endsWith(QLatin1String("<@comment>"))) + leading.chop(10); if (!leading.trimmed().isEmpty()) t += leading; } -- cgit v0.12