|
|
@ -60,7 +60,7 @@ import static androidx.core.text.HtmlCompat.TO_HTML_PARAGRAPH_LINES_CONSECUTIVE;
|
|
|
|
|
|
|
|
|
|
|
|
public class HtmlHelper {
|
|
|
|
public class HtmlHelper {
|
|
|
|
private static final int PREVIEW_SIZE = 250;
|
|
|
|
private static final int PREVIEW_SIZE = 250;
|
|
|
|
private static Pattern pattern = Pattern.compile("([http|https]+://[\\w\\S(\\.|:|/)]+)");
|
|
|
|
private static Pattern pattern = Pattern.compile("https?://[\\w#%&()*+,-./:;=?@\\[\\]_|~]+");
|
|
|
|
private static final List<String> heads = Arrays.asList("h1", "h2", "h3", "h4", "h5", "h6", "p", "table", "ol", "ul", "br", "hr");
|
|
|
|
private static final List<String> heads = Arrays.asList("h1", "h2", "h3", "h4", "h5", "h6", "p", "table", "ol", "ul", "br", "hr");
|
|
|
|
private static final List<String> tails = Arrays.asList("h1", "h2", "h3", "h4", "h5", "h6", "p", "ol", "ul", "li");
|
|
|
|
private static final List<String> tails = Arrays.asList("h1", "h2", "h3", "h4", "h5", "h6", "p", "ol", "ul", "li");
|
|
|
|
|
|
|
|
|
|
|
|