Android Open Source - MarkdownView H T M L Token






From Project

Back to project page MarkdownView.

License

The source code is released under:

Apache License

If you think the Android project MarkdownView listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.petebevin.markdown;
/*from   w  ww  .  ja v  a2 s. co m*/
public class HTMLToken {
    private boolean isTag;
    private String text;

    private HTMLToken(boolean tag, String value) {
        isTag = tag;
        text = value;
    }

    public static HTMLToken tag(String text) {
        return new HTMLToken(true, text);
    }

    public static HTMLToken text(String text) {
        return new HTMLToken(false, text);
    }

    /**
     * @return <code>true</code> if this is a tag, <code>false</code> if it's text.
     */
    public boolean isTag() {
        return isTag;
    }

    public String getText() {
        return text;
    }

    @Override
    public String toString() {
        String type;
        if (isTag()) {
            type = "tag";
        } else {
            type = "text";
        }
        return type + ": " + getText();
    }
}




Java Source Code List

com.petebevin.markdown.CharacterProtector.java
com.petebevin.markdown.HTMLDecoder.java
com.petebevin.markdown.HTMLToken.java
com.petebevin.markdown.LinkDefinition.java
com.petebevin.markdown.MarkdownProcessor.java
com.petebevin.markdown.Replacement.java
com.petebevin.markdown.TextEditor.java
us.feras.mdv.MarkdownView.java
us.feras.mdv.demo.LocalMarkdownActivity.java
us.feras.mdv.demo.MainActivity.java
us.feras.mdv.demo.MarkdownDataActivity.java
us.feras.mdv.demo.MarkdownThemesActivity.java
us.feras.mdv.demo.OnlineMarkdownActivity.java
us.feras.mdv.util.HttpHelper.java