Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Doc's new Document Tabs feature has broken links to headings #172

Closed
ShokoTB opened this issue Oct 10, 2024 · 4 comments
Closed

Google Doc's new Document Tabs feature has broken links to headings #172

ShokoTB opened this issue Oct 10, 2024 · 4 comments

Comments

@ShokoTB
Copy link

ShokoTB commented Oct 10, 2024

After Google rolled out its new Document tabs feature in Google Docs, Docs to Markdown is now unable to resolve links to headings. I realize that this is outside of your control but would really appreciate having Docs to Markdown working again. Thank you.

@evbacher
Copy link
Owner

evbacher commented Oct 11, 2024

Yeah, I just noticed that myself. I have a few other things I'm working on, but will try to fix this soon.

Some information relevant to the fix:
The test case produces this output:

Some internal links to headings in this doc (note that you need to generate a TOC with blue links in this doc for these intra-doc links to work):

* [Heading IDs](?tab=t.0#heading=h.w9shf4dpypi9)
* [Code blocks](?tab=t.0#heading=h.yhpbe0sh5kep)

Note the ?tab=t.0 added before the heading ID. This is breaking the code in Docs to Markdown that associates Google's heading ID with the named heading ID.

@evbacher
Copy link
Owner

evbacher commented Oct 12, 2024

I'm happy to report that internal links are now working as before. Fix was a bit tricky, but it should be OK now, regardless of which tab you're converting from. Please open a new bug if you see any issues I've missed relating to this.

Note: If you have duplicate headings (headings that contain exactly the same text), internal links to the second (or third) duplicate headings will go to the first heading. Duplicate headings are not a good practice, but we can fix this. I'm opening a new bug (#173), but may not get to that for a bit after some other development work.

@ShokoTB
Copy link
Author

ShokoTB commented Oct 12, 2024 via email

@evbacher
Copy link
Owner

You're welcome -- thanks for filing the bug! If you notice anything unusual, please reopen this bug.

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

No branches or pull requests

2 participants