Skip to content

Commit

Permalink
Fix(export): Fixing Sources heading formatting and ChatGPT sources se…
Browse files Browse the repository at this point in the history
…lector (#188)

* fix(export): adding second newline before Source horizontal rule to avoid last paragraph to be interpreted as header

* fix(export/ChatGPT): fix Sources opening selector

* docs: version and update notes
  • Loading branch information
Hugo-COLLIN authored Oct 1, 2024
1 parent cc113c5 commit 92d6f55
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "save-my-chatbot",
"version": "3.2.4",
"version": "3.2.6",
"license": "RMD-C v1.0 License",
"author": "Hugo COLLIN",
"homepage": "https://save.hugocollin.com",
Expand Down
4 changes: 4 additions & 0 deletions public/files/updateNotes.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Update notes
# 3.2.6
🧩 Some bug fixes
Fixing ChatGPT sources export and the sources markdown formatting thanks to users feedback.

# 3.2.4
🛠️ Fixing export bugs on Perplexity and ChatGPT
Perplexity first paragraphs in answers are now correctly exported again, as well as Youtube and file citations numbers in answer.
Expand Down
4 changes: 2 additions & 2 deletions src/scripts/content/export/extractor/domains/ChatGPT.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"sourcesExtraction": {
"selectors": [
{
"open": [{"selector": "p > button span", "scope": "content"}],
"close": [{"selector": "p > button span", "scope": "content"}],
"open": [{"selector": "p button span", "scope": "content"}],
"close": [{"selector": "p button span", "scope": "content"}],
"content": {"selector": "div.overflow-hidden a", "scope": "content"},
"extractionType": "list"
}
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/content/export/extractor/extractSources.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {safeExecute, sleep} from "../../../shared/utils/jsShorteners";
import {resetPagination, selectAndClick} from "../../interact/interact";
import {formatLink} from "../../../shared/formatter/formatMarkdown";

const SOURCES_HEADER = "\n---\n**Sources:**\n";
const SOURCES_HEADER = "\n\n---\n**Sources:**\n";
let res = "";
let i = 1;

Expand Down

0 comments on commit 92d6f55

Please sign in to comment.