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

Attribute 'compatible' #141

Open
2 tasks
naokazuterada opened this issue Apr 28, 2019 · 2 comments
Open
2 tasks

Attribute 'compatible' #141

naokazuterada opened this issue Apr 28, 2019 · 2 comments
Labels
new-feature Indecates new feature which maintainer planning or under consideration

Comments

@naokazuterada
Copy link
Owner

naokazuterada commented Apr 28, 2019

Purpose

Provide end users with easy configuration of configuration for various sites(GitHub, Gitlab, Bitbucket).

How important it is

Current configurations are complex.

Ref: #139 (comment)

Ideal implementation

<!-- MarkdownTOC compatibility="github" -->

is shorthand for

<!-- MarkdownTOC autolink="true" bracket="round" lowercase="only_ascii" -->

Notes

  • Enable to override if other attributes follow
<!-- MarkdownTOC compatibility="github" levels="1,2,3" -->
  • compatibility should contain not only 'attributes' setting but also id_replacements setting.
@naokazuterada naokazuterada added the feature-request Indicates new feature requests label Apr 28, 2019
@tajmone
Copy link

tajmone commented Apr 28, 2019

GitHub Settings

@naokazuterada, today I've encounted some more edge-case headings that required customizing my MarkdownTOC settings:

  • Remove trailing hyphens.
  • Remove consecutive hyphens (this must be the very last).
    {
      // remove trailing hyphens:
      "pattern": "\\-+$",
      "replacement": ""
    },
    {
      // reduce consecutive hyphens:
      "pattern": "\\-{2,}",
      "replacement": "-"
    },

Examples of headings that require this patterns:

heading GitHub anchor
# Lang ( Go ) #lang-go

without the above substitutions, the generated link would be #lang--go--.

Possibly there might still be some edge-cases lurking in the dark — which only confirms that managing manual settings for all Git services is quite cumbersome, whereas having server configurations is going to make life much easier, especially with package updates fixing any new uncovered incompatiblity edge case.

@naokazuterada
Copy link
Owner Author

naokazuterada commented Apr 28, 2019

@tajmone
Thank you for the reference case. It was very valuable.
I do not know that it will be possible with my effort to support all services, but I understood the importance of this feature. It would be able to obtain the required function by making the algorithm of ID conversion extensible and updating it little by little in the future. I agree.
I take this into my TODO list. 👍

@naokazuterada naokazuterada added new-feature Indecates new feature which maintainer planning or under consideration and removed feature-request Indicates new feature requests labels Apr 28, 2019
@naokazuterada naokazuterada added this to work in progress in Progress management Apr 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature Indecates new feature which maintainer planning or under consideration
Projects
Progress management
work in progress
Development

No branches or pull requests

2 participants