Search in sources :

Example 1 with Emoji

use of com.fastaccess.provider.markdown.extension.emoji.Emoji in project FastHub by k0shk0sh.

the class EmojiDelimiterProcessor method process.

@Override
public void process(Text opener, Text closer, int delimiterCount) {
    Node emoji = new Emoji();
    Node tmp = opener.getNext();
    while (tmp != null && tmp != closer) {
        Node next = tmp.getNext();
        emoji.appendChild(tmp);
        tmp = next;
    }
    opener.insertAfter(emoji);
}
Also used : Node(org.commonmark.node.Node) Emoji(com.fastaccess.provider.markdown.extension.emoji.Emoji)

Aggregations

Emoji (com.fastaccess.provider.markdown.extension.emoji.Emoji)1 Node (org.commonmark.node.Node)1