File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -216,18 +216,18 @@ void ManDocVisitor::operator()(const DocVerbatim &s)
216216 m_firstCol=TRUE ;
217217 break ;
218218 case DocVerbatim::JavaDocLiteral:
219- filter (s.text ());
219+ filter (s.text (), true );
220220 break ;
221221 case DocVerbatim::JavaDocCode:
222222 m_t << " \\ fR\n " ;
223- filter (s.text ());
223+ filter (s.text (), true );
224224 m_t << " \\ fP\n " ;
225225 break ;
226226 case DocVerbatim::Verbatim:
227227 if (!m_firstCol) m_t << " \n " ;
228228 m_t << " .PP\n " ;
229229 m_t << " .nf\n " ;
230- filter (s.text ());
230+ filter (s.text (), true );
231231 if (!m_firstCol) m_t << " \n " ;
232232 m_t << " .fi\n " ;
233233 m_t << " .PP\n " ;
@@ -984,7 +984,7 @@ void ManDocVisitor::operator()(const DocParBlock &pb)
984984 visitChildren (pb);
985985}
986986
987- void ManDocVisitor::filter (const QCString &str)
987+ void ManDocVisitor::filter (const QCString &str, const bool retainNewline )
988988{
989989 if (!str.isEmpty ())
990990 {
@@ -998,7 +998,7 @@ void ManDocVisitor::filter(const QCString &str)
998998 case ' .' : m_t << " \\ &." ; break ; // see bug652277
999999 case ' \\ ' : m_t << " \\\\ " ; break ;
10001000 case ' \" ' : m_t << " \" " ; insideDoubleQuote = !insideDoubleQuote; break ;
1001- case ' \n ' : if (!insideDoubleQuote) m_t << c; break ;
1001+ case ' \n ' : if (retainNewline || !insideDoubleQuote) m_t << c; break ;
10021002 default : m_t << c; break ;
10031003 }
10041004 }
Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ class ManDocVisitor : public DocVisitor
117117 // helper functions
118118 // --------------------------------------
119119
120- void filter (const QCString &str);
120+ void filter (const QCString &str, const bool retainNewline = false );
121121
122122 // --------------------------------------
123123 // state variables
You can’t perform that action at this time.
0 commit comments