Bug: Export to Markdown doesn't preserve Horizontal Rules syntax

Brian Johnson's Avatar

Brian Johnson

11 Apr, 2017 04:23 PM


When exporting to Markdown, the Bear Mac app exports horizontal rules by converting them to hyphens with spaces, irrespective of the user's entered syntax. This isn't ideal and can cause problems with some Markdown editors. The Bear iOS app doesn't have this problem.

Bear Version: Bear 1.1.1 for OS X (and previous)
OS version: OS X 10.11.6
Bear Version: Bear 1.1.2 for iOS (and previous)
OS versions: iOS 10.2.1


In either the Mac or the iOS app, I can insert a horizontal rule using the normal Markdown syntax or the App's commands, i.e. :

  • Three hyphens, or
  • Three asterisks, or
  • With the menu command or shortcut (macOS), or special key (iOS)

Bear then appears to insert a horizontal rule as expected, and this appears in the hybrid editor/preview window (macOS) or Preview (iOS). If I preview the note in Marked 2 (macOS), the horizontal rules also all display correctly.

However, when the Note is exported as Markdown (or Text Bundle) by the Mac app, the resulting file has four hyphens, each separated by a space.

So, the original syntax is being preserved within Bear, it's just the export that's changing it.

Although this behaviour strictly conforms to original John Gruber Markdown syntax, some current Markdown editors (e.g. Typora) interpret this as the start of a nested series of bullets. I have raised a bug report with Typora and that is a separate issue which is being dealt with.

Also, I think it's usual / desirable for apps to preserve whatever syntax has been written upon export or save (i.e., if the user chooses to use asterisks, the app should export asterisks, if the user chooses hyphens, it should export hyphens, and so on, as part of the plain text).

It doesn't matter where the note is created (macOS or iOS); it's where the export occurs that matters. Notes created on either iOS or macOS and then synced via Bear Pro will have a problem if exported on macOS. The same note - created on macOS or iOS - will export OK if done on iOS via the Share Sheet to, say 1Writer or another Markdown editor. They appear OK and have the original syntax.

NB - it also doesn't matter if 'Markdown Compatibility Mode' is selected in macOS Bear Preferences.

Hoping you can fix this!



Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac