Closed davidtcalabrese closed 2 years ago
Doesn't seem to be working. I wonder if the p tags are getting escaped somewhere in the process? Probably within the JSP.
Fixed it. The problem was I had too many escape characters in the text of the target argument to replace()
.
Changed this:
String postTextWithParagraphBreaks = postText.replace("\\n\\n", "<p>");
to this:
String postTextWithParagraphBreaks = postText.replace("\n\n", "<p>");
and now its working.
Text from OpenAI API comes back with paragraphs separated by "\n"s. Currently these don't appear in tiny editor as paragraphs.
The plan is to search the response text for newline characters and replace them with
<p>
tags.