diff options
Diffstat (limited to 'src/mandocvisitor.cpp')
-rw-r--r-- | src/mandocvisitor.cpp | 43 |
1 files changed, 8 insertions, 35 deletions
diff --git a/src/mandocvisitor.cpp b/src/mandocvisitor.cpp index 729f3d4..7669a0a 100644 --- a/src/mandocvisitor.cpp +++ b/src/mandocvisitor.cpp @@ -75,42 +75,15 @@ void ManDocVisitor::visit(DocWhiteSpace *w) void ManDocVisitor::visit(DocSymbol *s) { if (m_hide) return; - switch(s->symbol()) + const char *res = get_symbol_man(s->symbol()); + if (res) { - case DocSymbol::BSlash: m_t << "\\\\"; break; - case DocSymbol::At: m_t << "@"; break; - case DocSymbol::Less: m_t << "<"; break; - case DocSymbol::Greater: m_t << ">"; break; - case DocSymbol::Amp: m_t << "&"; break; - case DocSymbol::Dollar: m_t << "$"; break; - case DocSymbol::Hash: m_t << "#"; break; - case DocSymbol::DoubleColon: m_t << "::"; break; - case DocSymbol::Percent: m_t << "%"; break; - case DocSymbol::Pipe: m_t << "|"; break; - case DocSymbol::Copy: m_t << "(C)"; break; - case DocSymbol::Tm: m_t << "(TM)"; break; - case DocSymbol::Reg: m_t << "(R)"; break; - case DocSymbol::Apos: m_t << "'"; break; - case DocSymbol::Quot: m_t << "\""; break; - case DocSymbol::Lsquo: m_t << "`"; break; - case DocSymbol::Rsquo: m_t << "'"; break; - case DocSymbol::Ldquo: m_t << "``"; break; - case DocSymbol::Rdquo: m_t << "''"; break; - case DocSymbol::Ndash: m_t << "--"; break; - case DocSymbol::Mdash: m_t << "---"; break; - case DocSymbol::Uml: m_t << s->letter() << "\\*(4"; break; - case DocSymbol::Acute: m_t << s->letter() << "\\*(`"; break; - case DocSymbol::Grave: m_t << s->letter() << "\\*:"; break; - case DocSymbol::Circ: m_t << s->letter() << "\\*^"; break; - case DocSymbol::Slash: m_t << s->letter(); break; /* todo: implement this */ - case DocSymbol::Tilde: m_t << s->letter() << "\\*~"; break; - case DocSymbol::Szlig: m_t << "s\\*:"; break; - case DocSymbol::Cedil: m_t << s->letter() << "\\*,"; break; - case DocSymbol::Ring: m_t << s->letter() << "\\*o"; break; - case DocSymbol::Nbsp: m_t << " "; break; - default: - // unsupport symbol for man page :-( - break; + m_t << res; + } + else + { + // no error or warning to be supplied + // err("man: non supported HTML-entity found: &%s;\n",get_symbol_item(s->symbol())); } m_firstCol=FALSE; } |