/**
 * Copyright 2016 Bryan Kelly
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License.
 *
 * You may obtain a copy of the License at
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations
 * under the License.
 */
package com.btkelly.gnag.utils;

import org.jetbrains.annotations.NotNull;

public final class HtmlStringBuilder {

    private static final String BOLD_OPEN_TAG  = "<b>";
    private static final String BOLD_CLOSE_TAG = "</b>";
    private static final String LINE_BREAK_TAG = "<br />";

    private final StringBuilder stringBuilder;

    public HtmlStringBuilder() {
        stringBuilder = new StringBuilder();
    }

    @Override
    public String toString() {
        return stringBuilder.toString();
    }

    public HtmlStringBuilder append(@NotNull final CharSequence string) {
        stringBuilder.append(string);
        return this;
    }

    public HtmlStringBuilder appendLink(@NotNull final CharSequence string, @NotNull final String linkUrl) {
        stringBuilder
                .append("<a target=\"_blank\" href=\"")
                .append(linkUrl)
                .append("\">")
                .append(string)
                .append("</a>");
        return this;
    }

    public HtmlStringBuilder appendBold(@NotNull final CharSequence string) {
        stringBuilder
                .append(BOLD_OPEN_TAG)
                .append(string)
                .append(BOLD_CLOSE_TAG);
        return this;
    }

    public HtmlStringBuilder insertLineBreak() {
        stringBuilder.append(LINE_BREAK_TAG);
        return this;
    }

}

@@ -705,181 +705,8 @@
  %7B%0A%0A
-    private static final String BOLD_OPEN_TAG  = %22%3Cb%3E%22;%0A    private static final String BOLD_CLOSE_TAG = %22%3C/b%3E%22;%0A    private static final String LINE_BREAK_TAG = %22%3Cbr /%3E%22;%0A%0A
     
@@ -1539,21 +1539,13 @@
 end(
-BOLD_OPEN_TAG
+%22%3Cb%3E%22
 )%0A  
@@ -1602,22 +1602,244 @@
 end(
-BOLD_CLOSE_TAG
+%22%3C/b%3E%22);%0A        return this;%0A    %7D%0A%0A    public HtmlStringBuilder appendCode(@NotNull final CharSequence string) %7B%0A        stringBuilder%0A                .append(%22%3Ccode%3E%22)%0A                .append(string)%0A                .append(%22%3C/code%3E%22
 );%0A 
@@ -1947,22 +1947,16 @@
 end(
-LINE_BREAK_TAG
+%22%3Cbr /%3E%22
 );%0A 

Add appendCode method to HtmlStringBuilder