Skip to content

Fix paragraph indentation issue#508

Open
Xheldon wants to merge 1 commit intoobsidianmd:masterfrom
Xheldon:notion-api-492
Open

Fix paragraph indentation issue#508
Xheldon wants to merge 1 commit intoobsidianmd:masterfrom
Xheldon:notion-api-492

Conversation

@Xheldon
Copy link
Copy Markdown
Contributor

@Xheldon Xheldon commented Feb 27, 2026

Fix #492

Indentation elements below a paragraph were previously ignored; now they are correctly imported as child elements of the paragraph and indented.

But note that some Markdown elements do not support nesting, so you may encounter expected layout issues. For example, if a Paragraph in Notion has a Heading element as a child, when it’s imported into Obsidian it won’t be properly indented and rendered as a Heading; it will just appear as an indented "#" followed by the text content of heading.

@tgrosinger
Copy link
Copy Markdown
Contributor

tgrosinger commented Mar 13, 2026

I'm not sure that I understand this change. In obsidian if you indent a block of text, it turns it into a code block. That's not what we want when imported indented text from Notion, right?

@Xheldon
Copy link
Copy Markdown
Contributor Author

Xheldon commented Mar 16, 2026

@tgrosinger Are you referring to indentation as a Tab? Currently, the indentation of elements under a paragraph actually adds four spaces, as shown in the figure(ignore the content, i modify it after imported):

Notion content:
image

Obsidian Import it:
image

But it's true that indentation can cause many unexpected problems, such as list nesting. Unordered lists seem fine, but ordered lists don't appear to nest correctly after indentation.

Is this expected?

@Xheldon
Copy link
Copy Markdown
Contributor Author

Xheldon commented Mar 16, 2026

Also, I noticed that whether I use a Tab or four spaces for indentation, it doesn't turn into a code block. Am I missing something, or have I set something incorrectly?

@tianjiaoding
Copy link
Copy Markdown

Thank you for the efforts! I think the issue that the PR addresses is: currently, when there are indented content under a paragraph in Notion, the imported Obsidian markdown ignores the indented content (not only just the indentation). Perhaps it is up to debate how these content should be properly indented in Obsidian, but i think keeping these content is crucial.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Content missing for indented text blocks during Notion API import

3 participants