folder-syncing Markdown files: problem with linebreaks

Background: I’m syncing my Draft with a folder inside an Obsidian Vault that has Markdown files. (Obsidian is a note-taking software that manages Markdown files as a collection, a vault. I has a useful “graph” window and various plugin functions.) In “Sync with External Folder > Format”, I have set the format for the external files to “Plain Text”, and the extension to “md” (which I just typed in the box). This is an arrangement for writing a novel: Obsidian’s Vault for research notes, and Scrivener’s Draft for the manuscript. I would like to reference the .md notes in this synced folder/Vault, and they may contain tables and lists (which are text-based, written in Markdown, using “|”, “-”, etc). In Scrivener’s Editor, I styled these files to a monospace font so the text-based tables are easy to read from Scrivener. (Why not reference the notes simply by running Obsidian parallel to Scrivener? Because I want to create links from the notes to the manuscript so that I can click the keywords inside the notes to quickly go and edit the relevant specific parts of the manuscript.)

Problem: When I do “Sync > with External Folder Now” (Shift + F6) to update these .md files, Scrivener changes the single line breaks to what seem to be paragraph breaks, adding an extra blank line to each. It does this even when I have not edited the files at all from Scrivener: just the action of syncing from Scrivener adds extra blank lines to what are supposed to be single line breaks. This messes up the Markdown syntax: Obsidian (or any other Markdown editors, I suppose) previews/renders the things no longer as bordered tables or bullet-point lists, but as lines of text chopped up by double line breaks (which parse as paragraph breaks in Markdown), whereas Scrivener’s Editor itself continues to display these text-based tables and lists with the original single lines breaks (which would parse correctly as tables and lists in Markdown). I checked the files in Notepad, and they indeed have extra blank lines, which Scrivener’s Editor doesn’t show. (Meanwhile, I have no problem with “Link to Document” to create and maintain links from the .md Obsidian note files to the .rtf Scrivener manuscript files. The Scrivener-created links, for use only within Scrivener, don’t seem to get lost upon Obsidian-editing the .md files, as long as each linked portion of the text is intact.)

Question: Is there a way for Scrivener to treat the text of a particular file “flatly” as a pure text (which Markdown files are), without extra-processing the single line breaks or masking any double line breaks?

1 Like

Bumping this as I’d also like to know the answer to this q

The first thing to check is the status of this setting in the Sync Settings dialogue:

(Ignore the fact that the rest of the screenshot is not set up properly — once you change Format to Plain Text .md, the setting will become available.)

It’s there for those who like to write in Scrivener without lines between paragraphs: this setting adds a blank line on the way out to make it work in Markdown editors, and takes it out on the way back.

That’s not what you want if you’re using tables etc, so you need to make sure that “Automatically convert plain text paragraph spacing” is unticked.

If that doesn’t solve the problem, then it may be a bug in the Windows version, as the Mac version works as expected.

Does that help?