1919
2020package com .tpb .mdtext ;
2121
22- import android .content .Context ;
2322import android .graphics .Color ;
2423import android .support .annotation .NonNull ;
2524import android .support .annotation .Nullable ;
4241
4342import com .tpb .mdtext .handlers .CodeClickHandler ;
4443import com .tpb .mdtext .handlers .LinkClickHandler ;
45- import com .tpb .mdtext .views .MarkdownTextView ;
4644import com .tpb .mdtext .views .spans .CleanURLSpan ;
4745import com .tpb .mdtext .views .spans .ClickableTableSpan ;
4846import com .tpb .mdtext .views .spans .CodeSpan ;
5250import com .tpb .mdtext .views .spans .NumberSpan ;
5351import com .tpb .mdtext .views .spans .QuoteSpan ;
5452import com .tpb .mdtext .views .spans .RoundedBackgroundEndSpan ;
53+
5554import org .xml .sax .XMLReader ;
5655
5756import java .lang .reflect .Field ;
@@ -131,10 +130,8 @@ public String overrideTags(@Nullable String html) {
131130 private final TextPaint mTextPaint ;
132131 private LinkClickHandler mLinkHandler ;
133132 private CodeClickHandler mCodeHandler ;
134- private Context mContext ;
135133
136134 public HtmlTagHandler (TextView tv , @ Nullable LinkClickHandler linkHandler , @ Nullable CodeClickHandler codeHandler ) {
137- mContext = tv .getContext ();
138135 mTextPaint = tv .getPaint ();
139136 mLinkHandler = linkHandler ;
140137 mCodeHandler = codeHandler ;
@@ -145,9 +142,6 @@ public HtmlTagHandler(TextView tv, @Nullable LinkClickHandler linkHandler, @Null
145142 public void handleTag (final boolean opening , final String tag , Editable output , final XMLReader xmlReader ) {
146143 if (opening ) {
147144 // opening tag
148- if (MarkdownTextView .DEBUG ) {
149- Log .d (MarkdownTextView .TAG , "opening, output: " + output .toString ());
150- }
151145
152146 if (tag .equalsIgnoreCase (UNORDERED_LIST_TAG )) {
153147 lists .push (
@@ -236,9 +230,6 @@ public void handleTag(final boolean opening, final String tag, Editable output,
236230 }
237231 } else {
238232 // closing tag
239- if (MarkdownTextView .DEBUG ) {
240- Log .d (MarkdownTextView .TAG , "closing, output: " + output .toString ());
241- }
242233
243234 if (tag .equalsIgnoreCase (UNORDERED_LIST_TAG )) {
244235 lists .pop ();
@@ -544,9 +535,6 @@ private void storeTableTags(boolean opening, String tag) {
544535 private void start (Editable output , Object mark ) {
545536 int len = output .length ();
546537 output .setSpan (mark , len , len , Spannable .SPAN_MARK_MARK );
547- if (MarkdownTextView .DEBUG ) {
548- Log .d (MarkdownTextView .TAG , "len: " + len );
549- }
550538 }
551539
552540 /**
@@ -577,11 +565,6 @@ private void end(Editable output, Class kind, boolean paragraphStyle, Object...
577565 for (Object replace : replaces ) {
578566 output .setSpan (replace , where , thisLen , Spanned .SPAN_EXCLUSIVE_EXCLUSIVE );
579567 }
580-
581- if (MarkdownTextView .DEBUG ) {
582- Log .d (MarkdownTextView .TAG , "where: " + where );
583- Log .d (MarkdownTextView .TAG , "thisLen: " + thisLen );
584- }
585568 }
586569 }
587570
0 commit comments