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

Support For linenums for CodeHilite #16

Closed
sak96 opened this issue Sep 6, 2021 · 8 comments
Closed

Support For linenums for CodeHilite #16

sak96 opened this issue Sep 6, 2021 · 8 comments

Comments

@sak96
Copy link

sak96 commented Sep 6, 2021

line number can be enabled by passing linenums to codehilite

Codehilite(linenums=True)

If i want to raise PR which approach is advised.

  1. create VIMWIKIMARKDOWN_LINENUMS for passing this arguement
  2. parse VIMWIKIMARKDOWN_EXTENSION using ast.literal_eval and then add default plugins if they are not available
@WnP
Copy link
Owner

WnP commented Sep 8, 2021

Hi @sak96,

That's a great idea. I prefer the first option by the way. Fell free to open a PR, I'll review it ASAP.

Thanks

@sak96
Copy link
Author

sak96 commented Sep 8, 2021

I have raised pull request for both of them. #17 #18
do have a look at the doc links. ast.lteral_eval does not allow arbitrary code execution.
it only allows literals like 1 True None {} and so on and is more flexible

@sak96
Copy link
Author

sak96 commented Oct 10, 2021

#18 fixes this issue

@sak96 sak96 closed this as completed Oct 10, 2021
@sak96 sak96 reopened this Oct 10, 2021
@sak96
Copy link
Author

sak96 commented Oct 10, 2021

@WnP Please close this issue when you release to pypi

@sak96
Copy link
Author

sak96 commented Oct 11, 2021

let $VIMWIKI_MARKDOWN_EXTENSIONS='[{"codehilite": {"linenums": True}}]'

@sak96
Copy link
Author

sak96 commented Oct 27, 2021

@WnP hi sorry for anoyying you again. But would you be able to release with this feature ?

@sak96
Copy link
Author

sak96 commented Nov 6, 2021

@WnP, i am guessing you are pretty busy.
Closing the issue and installing using

pip install git+https://github.com/WnP/vimwiki_markdown

@sak96 sak96 closed this as completed Nov 6, 2021
@WnP
Copy link
Owner

WnP commented Nov 10, 2021

Hi @sak96,

I've just released 0.4.0.

Thanks for your interest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants