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

syntax highlightning #65

Open
austinmw opened this issue Jan 30, 2023 · 3 comments
Open

syntax highlightning #65

austinmw opened this issue Jan 30, 2023 · 3 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@austinmw
Copy link

Hi, since Medium now supports syntax highlighting, would it be possible to add an update so that code blocks are inserted in such a way that they get this highlighting by default? Currently I have to copy/delete/reinsert each code block to get syntax highlighting.

@mjam03 mjam03 added enhancement New feature or request help wanted Extra attention is needed labels Apr 1, 2023
@mjam03
Copy link
Collaborator

mjam03 commented Apr 1, 2023

Hi,

I haven't seen this yet - I'll look into it in the coming week and get back to you.

If it's quick i'll get it implemented right away, if not then i'll come back with what I find anyway.

Thanks for using the package!
Mark

@mjam03
Copy link
Collaborator

mjam03 commented Apr 1, 2023

Btw - are you using the 'gist' feature?

If not then that likely solves your issue at least for now by creating nicely formatted code blocks using gist - info on how to set up here:

https://github.com/dexplo/jupyter_to_medium#create--save-your-github-pat-only-required-for-gist-integration

@mjam03
Copy link
Collaborator

mjam03 commented Apr 1, 2023

Just had a quick look - here is the release notes they had:

https://blog.medium.com/code-blocks-with-syntax-highlighting-53343df53c4f

It looks like they don't yet support markdown style language declaration like:

"""``` python"""

If they do that then we can support it by adding that to the code snippets when we upload the articles - otherwise without the medium api being enhanced we can't submit the syntax highlighted codeblocks.

For now, I think your best bet is either to continue to manually copy and paste (smaller number of code blocks) or use the gist feature we have that will automatically create and embed gists in your article.

Mark

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants