Skip to content

Commit

Permalink
Merge branch 'master' of github.com:yzhang-gh/vscode-markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
yzhang committed Dec 11, 2020
2 parents 760a638 + d94a670 commit 383db06
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 14 additions & 2 deletions src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@ export function slugify(heading: string, mode?: string, downcase?: boolean) {
slug = slugifyMethods.azureDevops(slug);
break;

case 'bitbucket-cloud':
slug = 'markdown-header-' + slugifyMethods.github(slug);
case 'bitbucketCloud':
slug = slugifyMethods.bitbucketCloud(slug);
break;

default:
Expand Down Expand Up @@ -256,6 +256,18 @@ const slugifyMethods: { readonly [mode: string]: (text: string) => string; } = {
return slug;
},

/**
* Bitbucket Cloud
*/
"bitbucketCloud": (slug: string): string => {
// https://support.atlassian.com/bitbucket-cloud/docs/readme-content/
// https://bitbucket.org/tutorials/markdowndemo/
slug = 'markdown-header-'
+ slugifyMethods.github(slug).replace(/-+/g, '-');

return slug;
},

/**
* GitHub slugify function
*/
Expand Down

7 comments on commit 383db06

@Lemmingh
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What ... happened? 😳

@yzhang-gh
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this commit 3470598 is based on ef06e5b

image

@Lemmingh
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right. I rewrote and force-pushed it that night. #861 (comment)

I just wonder why to introduce this (383db06) three-way merge.

@yzhang-gh
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right. I rewrote and force-pushed it that night. #861 (comment)

I didn't even notice that as GitHub showed it as a normal commit. Then when I opened my local repo today and hit "sync", here we are. I just chose the easy way after I realized that.

@Lemmingh
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. My fault again. I'll email you as soon as I have any idea, to avoid such conflict.

@Lemmingh
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yzhang-gh
Would you mind to get the history linear again?

Just cherry-pick 7e10a5e onto d94a670.

@yzhang-gh
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Please sign in to comment.