public static @NotNull @Nls String buildHtml(@Nullable @Nls String title,
                                               @Nullable @Nls String subtitle,
                                               boolean boldTitle,
                                               @Nullable @Nls String content,
                                               @Nullable String style,
                                               @Nullable String titleColor,
                                               @Nullable String contentColor,
                                               @Nullable String contentStyle) {
    if (Notification.isEmpty(title) && !Notification.isEmpty(subtitle)) {
      title = subtitle;
      subtitle = null;
    }
    else if (!Notification.isEmpty(title) && !Notification.isEmpty(subtitle)) {
      title += ":";
    }

    HtmlBuilder htmlBuilder = new HtmlBuilder();
    if (!Notification.isEmpty(title)) {
      if (boldTitle) {
        HtmlChunk.Element titleChunk = HtmlChunk.raw(title).bold();
        if (StringUtil.isNotEmpty(titleColor)) {
          titleChunk = titleChunk.attr("color", titleColor);
        }

        htmlBuilder.append(titleChunk);
      }
      else {
        htmlBuilder.append(StringUtil.isNotEmpty(titleColor) ?
                           HtmlChunk.span().attr("color", titleColor).addText(title) :
                           HtmlChunk.raw(title));
      }
    }

    if (!Notification.isEmpty(subtitle)) {
      htmlBuilder.nbsp().append(StringUtil.isNotEmpty(titleColor) ?
                                HtmlChunk.span().attr("color", titleColor).addText(subtitle) :
                                HtmlChunk.raw(subtitle));
    }

    if (!Notification.isEmpty(content)) {
      HtmlChunk.Element contentChunk = HtmlChunk.raw(content).wrapWith(HtmlChunk.div());
      if (StringUtil.isNotEmpty(contentStyle)) {
        contentChunk = contentChunk.style(contentStyle);
      }

      if (StringUtil.isNotEmpty(contentColor)) {
        contentChunk = contentChunk.attr("color", contentColor);
      }

      htmlBuilder.append(contentChunk);
    }

    return StringUtil.isNotEmpty(style) ?
           htmlBuilder.wrapWith(HtmlChunk.div(style)).wrapWith(HtmlChunk.html()).toString() :
           htmlBuilder.wrapWithHtmlBody().toString();
  }
public static @NotNull @Nls String buildHtml(@Nullable @Nls String title,
                                               @Nullable @Nls String subtitle,
                                               boolean boldTitle,
                                               @Nullable @Nls String content,
                                               @Nullable String style,
                                               @Nullable String titleColor,
                                               @Nullable String contentColor,
                                               @Nullable String contentStyle)