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

Deal with markdown outputs of cells #36

Closed
choldgraf opened this issue Feb 24, 2020 · 3 comments
Closed

Deal with markdown outputs of cells #36

choldgraf opened this issue Feb 24, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@choldgraf
Copy link
Member

choldgraf commented Feb 24, 2020

We don't currently deal with the case that cells output markdown content, we should do so!

Would we want the markdown to become part of the top-level doctree, or would we want it to remain inside the CellOutputNode container it is a part of?

originally mentioned in #30

@akhmerov
Copy link
Contributor

I think taking these out of the CellOutputNode would make the doctree too confusing.

If the appearance of the cells and outputs is easy to control (e.g. hide any extra boxes or output markers), I hope there wouldn't be a problem.

@choldgraf
Copy link
Member Author

@akhmerov well I think the problem would be things like we had originally ran into in this repository. If the markdown parser finds a heading, then in the page doctree it will create a new section at the top level and start appending to that. So if someone output markdown that had headings in it, then the parser would normally start pulling that out of the CellOutputNode it's supposed to be in.

Maybe if we made the assumption: any document structure that is generated from a code cell should not be a part of the top-level doctree, then we could render that markdown into docutils nodes at transform time using a new Document object, and then just do cell_output_node.children = document.children

@chrisjsewell
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

3 participants