obsidianmd / obsidian-importer

Obsidian Importer lets you import notes from other apps and file formats into your Obsidian vault.
https://help.obsidian.md/import
MIT License
709 stars 66 forks source link

[Roam] Formatting of bullet lists #250

Open martin8032 opened 4 months ago

martin8032 commented 4 months ago

Being an outliner, Roam exports all information in the format of bullet lists.

The Obsidian Importer preserves these bullet lists, which is important. However, on a source code level things are not quite right, as the following example will illustrate:

  * Roam Bullet 1
  * Roam Bullet 2
      * Roam Bullet 2.1
      * Roam Bullet 2.2

- Obsidian Bullet 1
- Obsidian Bullet 2
    - Obsidian Bullet 2.1
    - Obsidian Bullet 2.2

The first section shows a bullet list that was imported with the Obsidian Importer from a Roam JSON file. The second section was added in Obsidian after the import.

The more obvious difference is the character that is used for the bullet. But this is not really an issue, since Obsidian accepts both characters ( - or * ).

The less obvious difference is how these lists are indented:

  1. In bullet lists created by Obsidian, the first level starts right at the beginning of a line (only the lower levels are indented). In bullet lists imported from Roam, the first level is indented as well.
  2. In bullet lists created by Obsidian, indentation happens through the tab character. In bullet lists imported from Roam, indentation is achieved through multiple spaces.

As a result, imported bullet lists may look OK right after the import, but as soon as you start editing them, you will run into troubles, forcing you to manually reformat the whole note. IMHO the Obsidian Importer should be improved in a way that imported bullet lists are formatted exactly the same way as newly created bullet lists.