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

Add support for Bitbucket Cloud ToC generation #861

Closed
hippiefm opened this issue Dec 8, 2020 · 11 comments
Closed

Add support for Bitbucket Cloud ToC generation #861

hippiefm opened this issue Dec 8, 2020 · 11 comments
Assignees
Labels
Area: Link (Reserved) Markdown link processing, URI recognition, slugification. Area: Table of contents Pertaining to table of contents (TOC generation and detection, related heading operations). Issue: Enhancement Improvements in existing features. Res: Fixed Fix is checked in, but it might be a few weeks until a release.
Milestone

Comments

@hippiefm
Copy link

hippiefm commented Dec 8, 2020

Proposal

This would be nice to have ToC slugify option fitted for Bitbucket. On GitHub each link to header looks like #main-header, but Bitbucket adds it own prefix on header class, which results in #markdown-header-main-header.

@yzhang-gh
Copy link
Owner

According to #703, Bitbucket doesn't create ids for Markdown headings. Has it changed recently? It would be good if you can provide some links (to some examples).

@hippiefm
Copy link
Author

hippiefm commented Dec 8, 2020

Sure, please take a look at this example repository. Bitbucket creates ids for Markdown headers like this: #markdown-header-is-this-a-long-header-name for header named "Is this a long header name?" (header level doesn't matter).

@yzhang-gh
Copy link
Owner

Thanks for the information.

I noticed that this (Bitbucket Cloud) is different from #703 (which is Bitbucket Server). (more)

I cannot find more about how Bitbucket Cloud generates the ids but let's just use markdown-header- + the GitHub version for now.

yzhang-gh pushed a commit that referenced this issue Dec 8, 2020
@yzhang-gh
Copy link
Owner

Please check out the dev build.

@yzhang-gh yzhang-gh added Area: Table of contents Pertaining to table of contents (TOC generation and detection, related heading operations). Issue: Enhancement Improvements in existing features. Res: Fixed Fix is checked in, but it might be a few weeks until a release. and removed Needs More Info labels Dec 8, 2020
@yzhang-gh yzhang-gh changed the title Add support for Bitbucket ToC generation Add support for Bitbucket Cloud ToC generation Dec 8, 2020
@Lemmingh
Copy link
Collaborator

Lemmingh commented Dec 8, 2020

I have a question about naming:

I presumed our convention is camelCase, but this time ... all-lower-case-with-hyphen?


And I forgot to tell you that in package.json, I put the default value first, and then sort others in alphabetical order, thinking it is friendly to users.

"enum": [
"github",
"azureDevops",
"gitea",
"gitlab",
"vscode",
"bitbucket-cloud"
],
"enumDescriptions": [
"GitHub",
"Azure DevOps",
"Gitea",
"GitLab",
"Visual Studio Code",
"Bitbucket Cloud"
]

yzhang-gh pushed a commit that referenced this issue Dec 8, 2020
@yzhang-gh
Copy link
Owner

Fixed!

@Lemmingh
Copy link
Collaborator

Lemmingh commented Dec 8, 2020

Still missed something. 😂
Rewrote.

@hippiefm
Copy link
Author

hippiefm commented Dec 9, 2020

Fixed!

Thank you guys, it is working perfectly now!

@Zebiano
Copy link

Zebiano commented Jul 5, 2021

Sorry if I'm asking at the wrong place, but this seemed the best one in my opinion. I'm not understanding how I can enable this feature... I'm currently facing the same issue, where I'd need to prefix markdown-header- on my ToC. I've searched in the settings of the extension, as well as here and couldn't find anything.

Sorry for the somewhat stupid question... Any help is appreciated!

@Lemmingh
Copy link
Collaborator

Lemmingh commented Jul 5, 2021

Please try the dev build:
https://github.com/yzhang-gh/vscode-markdown/actions/workflows/main.yml?query=event%3Apush+is%3Asuccess

I'm sorry that we're having trouble in releasing a new version. #966

@Zebiano
Copy link

Zebiano commented Jul 5, 2021

Oh, that's why. No problem at all of course! I'll give it a try, thank you.

@Lemmingh Lemmingh added the Area: Link (Reserved) Markdown link processing, URI recognition, slugification. label Aug 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Link (Reserved) Markdown link processing, URI recognition, slugification. Area: Table of contents Pertaining to table of contents (TOC generation and detection, related heading operations). Issue: Enhancement Improvements in existing features. Res: Fixed Fix is checked in, but it might be a few weeks until a release.
Projects
None yet
Development

No branches or pull requests

4 participants