Skip to content

Commit 31fa308

Browse files
CS-41851- Fixed issue of adding an extra <br/> tag in breaks.
1 parent f1602e2 commit 31fa308

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

src/main/java/com/contentstack/utils/render/DefaultOption.java

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ public String renderOptions(JSONObject embeddedObject, Metadata metadata) {
5454
*/
5555
@Override
5656
public String renderMark(MarkType markType, String text) {
57-
//String textContainsBreak = renderHtmlWithLineBreaks(text); // v1.2.5
5857
switch (markType) {
5958
case SUPERSCRIPT:
6059
return "<sup>" + text + "</sup>";
@@ -161,25 +160,6 @@ public String renderNode(String nodeType, JSONObject nodeObject, NodeCallback ca
161160
}
162161

163162

164-
/**
165-
* Returns the string replacing </n> is with the <br/> tags
166-
*
167-
* @param content the content
168-
* @return string with br tags
169-
* @apiNote the support for the br tags are included
170-
* @since v1.3.0
171-
*/
172-
private String renderHtmlWithLineBreaks(String content) {
173-
// Replace "\n" with "<br/>" tags
174-
return content.replaceAll("\\n", "<br />");
175-
// Now, you can render the HTML content
176-
// (You can use your rendering method here, e.g., send it to a WebView or display it in a GUI component)
177-
// For demonstration purposes, let's just print it
178-
// System.out.println(htmlContent);
179-
// return htmlContent;
180-
}
181-
182-
183163
/**
184164
* The function takes a JSONObject as input and returns a string containing the attributes and
185165
* their values, excluding certain keys.

0 commit comments

Comments
 (0)