File tree Expand file tree Collapse file tree 3 files changed +12
-6
lines changed
src/features/scraper/rules Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " save-my-chatbot" ,
3- "version" : " 3.8.0 " ,
3+ "version" : " 3.8.2 " ,
44 "license" : " RMD-C 1.1" ,
55 "author" : " Hugo COLLIN" ,
66 "homepage" : " https://save.hugocollin.com" ,
Original file line number Diff line number Diff line change 11# Update notes
2- # 3.8.0
2+ # 3.8.2
33🚀 Export your threads on Phind 2.0!
44The Phind interface completely changed, so the extension needed a refresh!
55Now it's back on tracks!
66
7+ 🧩 Fixing Perplexity export
8+ Newline formatting problem solved!
9+
710# 3.7.6
811🎯 Fix Perplexity sources list export
912Some sources were not correctly exported. It's now fixed!
Original file line number Diff line number Diff line change @@ -3,9 +3,11 @@ import {turndownConverter} from "../../../core/services/format/formatMarkdown";
33/*
44 --- Format pre-function ---
55 */
6- export function getBlankReplacement ( content : any , node : { nodeName : string ; getAttribute : ( arg0 : string ) => string ; } ) {
7- if ( node . nodeName === 'SPAN' && node . getAttribute ( 'class' ) === 'block mt-md' ) {
8- return '\n\n' ;
6+ export function getBlankReplacement ( content : any , node : HTMLElement ) {
7+ // if (node.nodeName === 'SPAN' && node.getAttribute('class') === 'block mt-md') {
8+ if ( node . nodeName === 'SPAN' ) {
9+ if ( node . classList . contains ( 'block' ) && node . classList . contains ( 'mt-md' ) ) return '\n\n' ;
10+ if ( node . innerHTML === '' ) return '\n' ;
911 } else {
1012 return '' ;
1113 }
@@ -88,10 +90,11 @@ export function filter_PreserveLineBreaksInPre_Claude(node: { nodeName: string;
8890}
8991
9092export function replacement_PreserveLineBreaksInPre_Perplexity ( content : any , node : { querySelector : ( arg0 : string ) => any ; } ) {
93+ console . log ( "replacement_PreserveLineBreaksInPre_Perplexity" , node )
9194 const codeBlock = node . querySelector ( 'code' ) ;
9295 const codeContent = codeBlock . textContent . trim ( ) ;
9396 const codeLang = codeBlock . parentNode . parentNode . parentNode . querySelector ( "div" ) . textContent . trim ( ) ;
94- return ( '\n```' + codeLang + '\n' + codeContent + '\n```' ) ;
97+ return ( turndownConverter . turndown ( "<br>" ) + '\n```' + codeLang + '\n' + codeContent + '\n```' ) ;
9598}
9699
97100export function replacement_preserveLineBreaksInPre_Phind ( content : any , node : { querySelector : ( arg0 : string ) => any ; } ) {
You can’t perform that action at this time.
0 commit comments