Package jodd.lagarto.dom.jerry

Examples of jodd.lagarto.dom.jerry.Jerry


            activity.content = replaceMentions(activity.content);
        }
    }
   
    protected static String replaceMentions(String content) {
        Jerry doc = jerry(content);
        doc.$("a").each(new JerryFunction() {

            public boolean onNode(Jerry linkHtml, int i) {
                final String link = linkHtml.attr("href");
                Matcher matcher = PROFILE_URL.matcher(link);
                if (matcher.matches()) {
                    final String mentionedId = matcher.group(1);
                    final Jerry mentionHtml = linkHtml.parent();
                    mentionHtml.html(mention(mentionedId, mentionHtml.html()));
                }
                return true;
            }
        });
        return doc.html();
View Full Code Here

TOP

Related Classes of jodd.lagarto.dom.jerry.Jerry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.