neo4j-documentation / asciidoctor-jupyter

A Jupyter converter for Asciidoctor.js. Write your Notebook in AsciiDoc!
16 stars 1 forks source link

Non python code still converted to a python code cell #6

Closed thomas-saigre closed 1 year ago

thomas-saigre commented 1 year ago

If I add these line of code in the adoc file :

[source, c++]
----
int main()
{
    return 0;
}
----

the exported notebook contains a Python cell, with the c++ code inside image

Would it be possible to make a markdown code, where the content of the cell is a markdown version of the given c++ code ? (and more generally for all the other languages than python if we want to export a Python notebook)

ggrossetie commented 1 year ago

That's a good point! Yes we can, currently we convert any listing blocks but we can retrieve the language attribute and do something different:

https://github.com/neo4j-documentation/asciidoctor-jupyter/blob/c3d95f031bdf3f52e88768ab745c9791e251798b/src/index.js#L112-L128

Feel free to submit a pull request.

ggrossetie commented 1 year ago

resolved in #7