I have converted some epub books into markdown via pandoc, It caused a lot of linebreaks inside paragraphs, but paragraphs are still distinguishable. I want to remove only single linebreaks from the text. Right now I am using this AHK script which I have to select every paragraph manually to work. And it acts weirdly from time to time so I have to pay a close attention and waste my time. I suspect it is because of using Clipboard in it.
Is there a find and replace way of solving it, or even a script in any language that I can run Inside obsidian?
They are old school command line tools, if you can paste an example file here and the expected result I may be able to point you in the right direction.
P.S. : Also as I was uploading these files I noticed that both files look the same in Typora even in edit mode. Maybe It is just a problem with my setting after all
I would look at these in a text editor, the only discernible difference I notice, is that the original will have something like this: []{#pagelist_173}with, and the final result will have something like this: []with.
That happens because of the AHK code I use and is not intentional, it also removes “!” for some reason.
Which text editor you are using? I am looking at them now with Notepad and there is a lot of difference, actually it’s the Original ones that looks human readable to my surprise because of linebreaks in each line.
Thanks, It would still save me a lot of time, comparing the code I am using right now.
What character I should enter in Ctrl + F to search for paragraph breaks/ line breaks and spaces?
On Macs, users type option enter for a paragraph return and command option enter for a line break. Don’t know the keystrokes for other operating systems. I could see that the file had paragraph returns at the end of the broken lines (not line breaks), so I only had to search and replace those. It helps to see invisible characters to understand the construction of the text. Don’t know what apps show invisibles in Windows. Word? Scrivener? Notepad?
I searched a bit and Notepad++ can do it just fine, altho I think It could be added to obsidian core as a useful feature. I am sure it is important for regex in other occasions too.