chatgpt web interface is now stripping any <br> tag in the response. see #462
This commit is contained in:
parent
dda315be57
commit
f97acf0ece
1 changed files with 5 additions and 1 deletions
|
|
@ -502,7 +502,7 @@ async function doProceed(message, customText = ''){
|
|||
if(_gpt_model != ''){
|
||||
await checkGPTModel(_gpt_model);
|
||||
}
|
||||
let final_prompt = message.prompt;
|
||||
let final_prompt = replaceBrWithNewline(message.prompt);
|
||||
// console.log(">>>>>>>>>>>> doProceed customText: " + customText);
|
||||
// console.log(">>>>>>>>>>>> doProceed final_prompt: " + final_prompt);
|
||||
// console.log(">>>>>>>>>>>> doProceed mztaPhDefVal: " + JSON.stringify(mztaPhDefVal));
|
||||
|
|
@ -774,6 +774,10 @@ function run(checkTab = null) {
|
|||
}
|
||||
}
|
||||
|
||||
function replaceBrWithNewline(input) {
|
||||
return input.replace(/<br\\s*\\/?>/gi, '\\n');
|
||||
}
|
||||
|
||||
// In the content script
|
||||
browser.runtime.onMessage.addListener((message, sender, sendResponse) => {
|
||||
//console.log(">>>>>>>>>>>>> content.js onMessage: " + JSON.stringify(message));
|
||||
|
|
|
|||
Loading…
Reference in a new issue