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

Bugfix: file extension for markdown is syntax wide #895

Merged
merged 1 commit into from
Jun 1, 2020
Merged

Conversation

Nudin
Copy link
Member

@Nudin Nudin commented May 30, 2020

populate_extra_markdown_vars() contained uses of the file-extension via
vimwiki#vars#get_wikilocal. Since the first is syntax-wide and the second is
wikilocal and no wiki is specified or open at the moment of the call, the file
extension of the first markdown wiki will be used for all markdown wikis.

This PR fixes this via use of the existing template infrastructure.

This bug becomes critical when merging #889 or fixing #894.

@Nudin
Copy link
Member Author

Nudin commented May 30, 2020

The alternative solution would have been moving WikiLinkMatchUrlTemplate to the wiki-local settings altogether, but since we already have and use the template filling function I thought this is the cleaner approach. Issue #892 might however make it nessecary to move it nethertheless?

@tinmarino
Copy link
Member

The alternative solution: moving WikiLinkMatchUrlTemplate to the wiki-local settings altogether

Yes good idea, but currently a premature optimization.

This PR is working towards separating wiki and syntax which is the good way. Once they are separated, it will be really easy to:

  1. Load only the syntax we need
  2. Even make 3 autoload files
  3. Make an user accessible syntax dic
  4. Add Pressing enter to create a [[double bracket]] #892 feature request

This way, we can move the syntax feature requests to the user scope.

@Nudin Nudin merged commit afc8689 into dev Jun 1, 2020
@Nudin Nudin added this to Done in v2.6 Jun 5, 2020
@tinmarino tinmarino moved this from Done to In progress in v2.6 Jun 6, 2020
@tinmarino tinmarino moved this from In progress to Done in v2.6 Jul 26, 2020
deepredsky pushed a commit to deepredsky/vimwiki that referenced this pull request Jan 16, 2021
populate_extra_markdown_vars() contained uses of the file-extension via vimwiki#vars#get_wikilocal. Since the first is syntax-wide and the second is wikilocal and no wiki is specified or open at the moment of the call, the file extension of the first markdown wiki will be used for all markdown wikis. Further problems will occur when adding new wikilocal options, that depend on the syntax.

This commit is working towards separating wiki and syntax, which is needed for several feature requests.
@brennen brennen deleted the markdown_globalext branch May 23, 2022 04:45
jls83 pushed a commit to jls83/vimwiki that referenced this pull request Jan 17, 2023
populate_extra_markdown_vars() contained uses of the file-extension via vimwiki#vars#get_wikilocal. Since the first is syntax-wide and the second is wikilocal and no wiki is specified or open at the moment of the call, the file extension of the first markdown wiki will be used for all markdown wikis. Further problems will occur when adding new wikilocal options, that depend on the syntax.

This commit is working towards separating wiki and syntax, which is needed for several feature requests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
v2.6
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants