@@ -54,8 +54,6 @@ public String renderOptions(JSONObject embeddedObject, Metadata metadata) {
5454 */
5555 @ Override
5656 public String renderMark (MarkType markType , String text ) {
57- // Replace "\n" with "<br/>" tags
58- text = renderHtmlWithLineBreaks (text );
5957 switch (markType ) {
6058 case SUPERSCRIPT :
6159 return "<sup>" + text + "</sup>" ;
@@ -72,7 +70,7 @@ public String renderMark(MarkType markType, String text) {
7270 case BOLD :
7371 return "<strong>" + text + "</strong>" ;
7472 case BREAK :
75- return "<br />" + text ;
73+ return "<br />" + text ; // v1.2.5
7674 default :
7775 return text ;
7876 }
@@ -101,11 +99,8 @@ private String escapeInjectHtml(JSONObject nodeObj, String nodeType) {
10199 */
102100 @ Override
103101 public String renderNode (String nodeType , JSONObject nodeObject , NodeCallback callback ) {
104-
105102 String strAttrs = strAttrs (nodeObject );
106-
107103 String children = callback .renderChildren (nodeObject .optJSONArray ("children" ));
108-
109104 switch (nodeType ) {
110105 case "p" :
111106 return "<p" + strAttrs + ">" + children + "</p>" ;
@@ -165,28 +160,6 @@ public String renderNode(String nodeType, JSONObject nodeObject, NodeCallback ca
165160 }
166161
167162
168- /**
169- * Returns the string replacing </n> is with the <br/> tags
170- *
171- * @param content the content
172- * @return string with br tags
173- * @apiNote the support for the br tags are included
174- * @since v1.3.0
175- */
176- private String renderHtmlWithLineBreaks (String content ) {
177- // Replace "\n" with "<br/>" tags
178- String htmlContent = content .replaceAll ("\\ n" , "<br />" );
179-
180- // Now, you can render the HTML content
181- // (You can use your rendering method here, e.g., send it to a WebView or display it in a GUI component)
182-
183- // For demonstration purposes, let's just print it
184- System .out .println (htmlContent );
185-
186- return htmlContent ;
187- }
188-
189-
190163 /**
191164 * The function takes a JSONObject as input and returns a string containing the attributes and
192165 * their values, excluding certain keys.
0 commit comments