iamjackg / md2cf

Convert and upload Markdown documents to Confluence
MIT License
93 stars 52 forks source link

Relative links break with a hash (#) to sub-section #77

Closed jimstein3d closed 1 year ago

jimstein3d commented 1 year ago

Markdown reference to section from another (slask.md) file will not work after import to Confluence. slask.md contains:

#  Main section

##  [sub-section](./child.md#sub-section)    
##  [sub-section](/child.md#sub-section)
##  [sub-section](child.md#sub-section)

This will result in broken links i confluence.

(/child.md#sub-section) results in a link like this https:///\<my-secret>.atlassian.net/child.md#sub-section

Edit: out problem seem to be that urlparse.urlparse(link) marks sub-section as a fragment and then dont create a replacement_link.

iamjackg commented 1 year ago

This is released!