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

allow highlighting language to be set from notebook metadata #5272

Merged
merged 1 commit into from Mar 5, 2014

Conversation

minrk
Copy link
Member

@minrk minrk commented Mar 5, 2014

Julia notebooks already set this value, so they should be properly handled immediately.

@ellisonbg
Copy link
Member

Great! Doesn't our own notebook server not set this metadata field at the notebook level? Won't that mean that this code will fail on a regular python notebook? What about other language notebooks that don't set this field. Should we set nb['metadata']['language'] to python for our kernel for 2.0? Sorry for all the question...

@ellisonbg ellisonbg added this to the 2.0 milestone Mar 5, 2014
@minrk
Copy link
Member Author

minrk commented Mar 5, 2014

That's what if 'language' in nb['metadata']: is for.

@ellisonbg
Copy link
Member

The point I missed is that highlight2html handles the language=None case already.

@ellisonbg
Copy link
Member

This looks good. +1 on merging.

minrk added a commit that referenced this pull request Mar 5, 2014
allow highlighting language to be set from notebook metadata
@minrk minrk merged commit 9cea9c0 into ipython:master Mar 5, 2014
@minrk minrk deleted the highlight-language-metadata branch March 5, 2014 17:57
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
allow highlighting language to be set from notebook metadata
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants