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

How to handle of [[TOC]] in markdown #1904

Closed
glensc opened this issue Apr 1, 2022 · 4 comments
Closed

How to handle of [[TOC]] in markdown #1904

glensc opened this issue Apr 1, 2022 · 4 comments
Labels
question Question about functionality

Comments

@glensc
Copy link

glensc commented Apr 1, 2022

Search terms

toc

Question

I have README.md that contains [[TOC]] this is rendered by GitLab to Table Of Contents.

  1. Is there way to replace [[TOC]] with empty a string?
  2. is there any plugin to handle rendering of [[TOC]]?
  3. do something else?

I'm not sure what to do with it, but currently, it's just ugly. Not important to render the [[TOC]].

@glensc glensc added the question Question about functionality label Apr 1, 2022
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Apr 1, 2022

You can do this today for comments with a plugin: https://www.npmjs.com/package/typedoc-plugin-replace-in-comments

I suspect that plugin not working in readme files was an oversight, it would be an easy fix.

@glensc
Copy link
Author

glensc commented Apr 1, 2022

The plugin description says it replaces in comments (I assume code comments?), but the [[TOC]] is not in comments but readme.md.

Altho the plugin may work, haven't tested.

@krisztianb
Copy link
Contributor

Currently the plugin only replaces text in code comments. But it makes sense to replace also in other parts of the documentation without having to install another plugin just for that purpose. I'll keep you posted in the other thread that Gerrit opened in the plugin's repo.

@krisztianb
Copy link
Contributor

Just in case anybody finds this while having a similar problem.

The following plugin can be used to solve this: https://github.com/krisztianb/typedoc-plugin-replace-text

@Gerrit0 Gerrit0 closed this as completed Apr 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question about functionality
Projects
None yet
Development

No branches or pull requests

3 participants