@Override
    public SimpleTextAttributes calcAttributes(javax.swing.text.html.HTML.Tag tag, MutableAttributeSet attr) {
      SimpleTextAttributes styleAttributes = parseStyleIfPossible(attr);

      if (tag == DIV || tag == SPAN) return styleAttributes;

      SimpleTextAttributes tagAttributes = null;
      if (tag == B) tagAttributes = REGULAR_ATTRIBUTES;
      if (tag == I) tagAttributes = REGULAR_ITALIC_ATTRIBUTES;
      if (tag == U) tagAttributes = new SimpleTextAttributes(STYLE_UNDERLINE, null);
      if (tag == S) tagAttributes = new SimpleTextAttributes(STYLE_STRIKEOUT, null);
      if (tag == A) tagAttributes = LINK_PLAIN_ATTRIBUTES;

      if (tagAttributes != null && styleAttributes != null) {
        return merge(tagAttributes, styleAttributes);
      }

      return tagAttributes;
    }
@Override
    public SimpleTextAttributes calcAttributes(javax.swing.text.html.HTML.Tag tag, MutableAttributeSet attr)