summaryrefslogtreecommitdiffstats
path: root/src/latexdocvisitor.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2018-11-11 13:37:10 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2018-11-11 13:37:10 (GMT)
commit79c7a88dba9e7f136ab87b824414d47fa6ae94fe (patch)
tree681a7466e3b479e91497f6c094891b1496d161e1 /src/latexdocvisitor.cpp
parent9440d7ce0b31749b6bbb13e70e2f7ed501505c7e (diff)
parente7fde5d604faf27dec989c8894e949d48676e0c1 (diff)
downloadDoxygen-79c7a88dba9e7f136ab87b824414d47fa6ae94fe.zip
Doxygen-79c7a88dba9e7f136ab87b824414d47fa6ae94fe.tar.gz
Doxygen-79c7a88dba9e7f136ab87b824414d47fa6ae94fe.tar.bz2
Merge branch 'feature/issue_6517' of https://github.com/albert-github/doxygen into albert-github-feature/issue_6517
Diffstat (limited to 'src/latexdocvisitor.cpp')
-rw-r--r--src/latexdocvisitor.cpp50
1 files changed, 50 insertions, 0 deletions
diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp
index 56691cf..3a6efaa 100644
--- a/src/latexdocvisitor.cpp
+++ b/src/latexdocvisitor.cpp
@@ -33,6 +33,7 @@
#include "filedef.h"
#include "config.h"
#include "htmlentity.h"
+#include "emoji.h"
#include "plantuml.h"
const int maxLevels=5;
@@ -210,6 +211,55 @@ void LatexDocVisitor::visit(DocSymbol *s)
}
}
+void LatexDocVisitor::visit(DocEmoji *s)
+{
+ if (m_hide) return;
+ const char *res_text = EmojiEntityMapper::instance()->text(s->emoji());
+ if (res_text)
+ {
+ const char *res_code = EmojiEntityMapper::instance()->code(s->emoji());
+ m_t << "\\doxygenemoji{";
+ filter(res_text);
+ m_t << "}{";
+ m_t << res_code;
+ m_t << "}{";
+ const char *p = res_code;
+ char res[10];
+ int i = 0;
+ bool first = TRUE;
+ while (*p)
+ {
+ switch(*p)
+ {
+ case '&': case '#': case 'x':
+ break;
+ case ';':
+ res[i] = '\0';
+ if (!first) m_t << "-";
+ m_t << res;
+ first = FALSE;
+ i = 0;
+ break;
+ case '0': case '1': case '2': case '3': case '4':
+ case '5': case '6': case '7': case '8': case '9':
+ res[i] = *p;
+ i++;
+ break;
+ case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
+ res[i] = *p -'a' + 'A'; // so it is uppercase
+ i++;
+ break;
+ }
+ p++;
+ }
+ m_t << "}";
+ }
+ else
+ {
+ err("LaTeX: non supported Emoji-entity found: %s\n",EmojiEntityMapper::instance()->html(s->emoji()));
+ }
+}
+
void LatexDocVisitor::visit(DocURL *u)
{
if (m_hide) return;