33b89a1e by RSA

fixes

1 parent b0078561
...@@ -64,17 +64,15 @@ function App() { ...@@ -64,17 +64,15 @@ function App() {
64 const programmingKeywords = ['code', 'application', 'controller', 'rails' , 'PHP', 'java', 'javascript', 'script', 'console', 'python', 'programming', 'table']; 64 const programmingKeywords = ['code', 'application', 'controller', 'rails' , 'PHP', 'java', 'javascript', 'script', 'console', 'python', 'programming', 'table'];
65 65
66 const regex = new RegExp(`\\b(${programmingKeywords.join('|')})\\b`, 'gi'); 66 const regex = new RegExp(`\\b(${programmingKeywords.join('|')})\\b`, 'gi');
67 console.log(regex) 67 // console.log(regex)
68 const matches = parsedData.match(regex); 68 const matches = parsedData.match(regex);
69 console.log(matches); 69 // console.log(matches);
70 if (!matches) { 70 if (!matches) {
71 var replaceTags = (parsedData.replace(/(?:\r\n|\r|\n)/g, '<br>').replace(/\./g, '. ')) 71 var replaceTags = (parsedData.replace(/(?:\r\n|\r|\n)/g, '<br>').replace(/\./g, '. '))
72 console.log("not programming!") 72 // console.log("not programming!")
73 // return replaceTags
74 } else { 73 } else {
75 replaceTags = (parsedData.replace(':',':<code>').replace('<?','&#60;?').replace('?>','?&#62;').replace(/\n/g, '<br>')) 74 replaceTags = (parsedData.replace(':',':<code>').replace('<?','&#60;?').replace('?>','?&#62;').replace(/\n/g, '<br>'))
76 console.log("programming!") 75 // console.log("programming!")
77 // return replaceTags
78 //.replace('<?','&#60;' + '?').replace('?>','?'+'&#62;') 76 //.replace('<?','&#60;' + '?').replace('?>','?'+'&#62;')
79 } 77 }
80 setChatLog([...chatLogNew, { user: "gpt", message: `${replaceTags}`} ]) 78 setChatLog([...chatLogNew, { user: "gpt", message: `${replaceTags}`} ])
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!