heseber5k downloadsFix references and their hyperlinks in text pasted from Perplexity.
This plugin can be used to fix the references (sources) in Perplexity output that is pasted into Obsidian notes.
This will replace the selection with the fixed text. See below for details.
Note for iOS/iPadOS users: If you have the "Auto-select all text on mobile" setting enabled, the plugin will automatically select all text in the note if no text is currently selected, making it easier to process entire notes on mobile devices.
It is intentional that the plugin does not process the entire Obsidian file but only the selection because you may have a note that already has a previously fixed response from Perplexity or some other text, and later add another response from Perplexity to the same note. Fixing the entire note would then break things because it would try to re-process the original first response that was already fixed.
References in answers from Perplexity (web page or MacOS app) are specified as numbers surrounded by rectangular brackets in the text, such as [1]. Obsidian interpretes this construct as an external link, but since there is no URL attached, clicking on the link has no effect. Even worse, if there are multiple consecutive references in the text, such as [1][2], then Obsidian displays only the first number.
The full references are listed at the end of the response. This section is initiated with a line called "Citations:" (in the Web version) or "Sources" or "Quellen" (in the German desktop version). The subsequent lines again have numbers surrounded by brackets at the beginning of each line, followed by the actual reference. Also here, the numbers are interpreted as external links that lead nowhere.
This plugin:
This setting can be used to add additional tag lines that define the beginning of the reference section for your own language.
When enabled, automatically selects all text in the note on iOS/iPadOS if no text is currently selected. This makes it easier to process entire notes on mobile devices without having to manually select all text first.