souvikinator / notion-to-md

Convert notion pages, block and list of blocks to markdown (supports nesting and custom parsing)
https://www.npmjs.com/package/notion-to-md
MIT License
1.08k stars 90 forks source link

an small convertion issue in `callout` blocks #48

Closed alerezaaa closed 2 years ago

alerezaaa commented 2 years ago

Hi :) I found another small issue Let me show you some screenshots

Notion: Screenshot_20220802_232634

Result: Screenshot_20220802_231555 code: Screenshot_20220802_230846 right here, the four-space before image without >


Expectation: Screenshot_20220802_231604 manually edited code: Screenshot_20220802_233409

same in github (markdown), its not a Jekyll-specific problem Screenshot_20220802_234412

thanks in advance

alerezaaa commented 2 years ago

Update Same issue on quotes

I guess its because of an empty line between first and other line of quotation

without blank line:

this is first line its second line

> this is first line
its second line

with a blank line:

its first line

its second line

> its first line

its second line

note that, in my screenshots above, I used a > to put Github Secret image on quote but I realized that its better to remove > and the space afterward (to make sure that Jekyll wont create a code-block)

souvikinator commented 2 years ago

The callout seems to be an issue, however the quotes block works perfectly fine on my side with and without a blank line. Here is the Notion block:

image

Here is the output markdown

image

and here is the rendered markdown

image
souvikinator commented 2 years ago

The callout issue is not fixed and is live in v2.5.5. Closing the issue now. Feel free to reopen the issue if any problem persists. Thank you for the contribution.

alerezaaa commented 2 years ago

Thanks a lot for your response :heart:

So, for a block line in quote, a > should be write at first of each line

second, I used quote combined with list and the output markdown is:

> Updates:

    - use `publishTime` instead on `created_time` so the time can be modified by a property
    - use `topCategories` and `subCategories` to categorize posts (note that my theme support only one-step subcategory)
    - use `mathCheck` and `mermaidCheck` to enable Math and Mermaid support in posts

preview:

Updates:

- use `publishTime` instead on `created_time` so the time can be modified by a property
- use `topCategories` and `subCategories` to categorize posts (note that my theme support only one-step subcategory)
- use `mathCheck` and `mermaidCheck` to enable Math and Mermaid support in posts

Edited

I edited this to (remove blank line)

> Updates:
    - use `publishTime` instead on `created_time` so the time can be modified by a property
    - use `topCategories` and `subCategories` to categorize posts (note that my theme support only one-step subcategory)
    - use `mathCheck` and `mermaidCheck` to enable Math and Mermaid support in posts

preview:

Updates:

  • use publishTime instead on created_time so the time can be modified by a property
  • use topCategories and subCategories to categorize posts (note that my theme support only one-step subcategory)
  • use mathCheck and mermaidCheck to enable Math and Mermaid support in posts

Edit 2

> Updates:
    - use `publishTime` instead on `created_time` so the time can be modified by a property
    - use `topCategories` and `subCategories` to categorize posts (note that my theme support only one-step subcategory)
    - use `mathCheck` and `mermaidCheck` to enable Math and Mermaid support in posts

preview

Updates:

  • use publishTime instead on created_time so the time can be modified by a property
  • use topCategories and subCategories to categorize posts (note that my theme support only one-step subcategory)
  • use mathCheck and mermaidCheck to enable Math and Mermaid support in posts

Edit 3

> Updates:
> - use `publishTime` instead on `created_time` so the time can be modified by a property
> - use `topCategories` and `subCategories` to categorize posts (note that my theme support only one-step subcategory)
> - use `mathCheck` and `mermaidCheck` to enable Math and Mermaid support in posts

preview

Updates:

  • use publishTime instead on created_time so the time can be modified by a property
  • use topCategories and subCategories to categorize posts (note that my theme support only one-step subcategory)
  • use mathCheck and mermaidCheck to enable Math and Mermaid support in posts