public static @NotNull @Nls String buildHtml(final @NotNull Notification notification,
                                               @Nullable String style,
                                               boolean isContent,
                                               @Nullable Color color,
                                               @Nullable String contentStyle) {
    String title = !isContent ? notification.getTitle() : "";
    String subtitle = !isContent ? notification.getSubtitle() : null;
    String content = isContent ? notification.getContent() : "";
    if (title.length() > TITLE_LIMIT || StringUtil.length(subtitle) > TITLE_LIMIT || content.length() > CONTENT_LIMIT) {
      LOG.info("Too large notification " + notification + " of " + notification.getClass() +
               "\nListener=" + notification.getListener() +
               "\nTitle=" + title +
               "\nSubtitle=" + subtitle +
               "\nContent=" + content);
      title = StringUtil.trimLog(title, TITLE_LIMIT);
      subtitle = StringUtil.trimLog(StringUtil.notNullize(subtitle), TITLE_LIMIT);
      content = StringUtil.trimLog(content, CONTENT_LIMIT);
    }
    if (isContent) {
      content = StringUtil.replace(content, P_TAG, BR_TAG);
    }
    boolean boldTitle = false;
    if (!Notification.isEmpty(title) || !Notification.isEmpty(subtitle)) {
      boldTitle = !Notification.isEmpty(notification.getContent());
    }
    String colorText = color == null ? null : "#" + ColorUtil.toHex(color);
    return buildHtml(title, subtitle, boldTitle, content, style, isContent ? null : colorText, isContent ? colorText : null, contentStyle);
  }
public static @NotNull @Nls String buildHtml(final @NotNull Notification notification,
                                               @Nullable String style,
                                               boolean isContent,
                                               @Nullable Color color,
                                               @Nullable String contentStyle)