kjk / notionapi

Unofficial Go API for Notion.so
https://blog.kowalczyk.info/article/c9df78cbeaae4e0cb2848c9964bcfc94/using-notion-api-go-client.html
BSD 2-Clause "Simplified" License
1.82k stars 86 forks source link

Cannot get page if there is a link to itself #21

Closed ImSingee closed 4 years ago

ImSingee commented 4 years ago

If there is a "Link to page" block on the page, and the page points to itself, something goes wrong.

  1. Can't use DownloadPage to download the page content.
  2. If using the ToMarkdown method in tomarkdown package, an endless loop will be caused.

I create a page for example: https://www.notion.so/singee/Test-15061913435e4d79a49daff515f2afe0

kjk commented 4 years ago

Thanks for the report, should be fixed.

ImSingee commented 4 years ago

Thanks! The DownloadPage worked now, but ToMarkdown won't convert blocks after the "Link to page" block.