aboutsummaryrefslogtreecommitdiff
path: root/test/ipynb
AgeCommit message (Collapse)AuthorFilesLines
2021-09-28Switch from pretty-simple to pretty-show for native output.John MacFarlane1-93/+90
Update tests. Reason: it turns out that the native output generated by pretty-simple isn't always readable by the native reader. According to https://github.com/cdepillabout/pretty-simple/issues/99 it is not a design goal of the library that the rendered values be readable using 'read'. This makes it unsuitable for our purposes. pretty-show is a bit slower and it uses 4-space indents (non-configurable), but it doesn't have this serious drawback.
2021-09-21Use pretty-simple to format native output.John MacFarlane1-15/+106
Previously we used our own homespun formatting. But this produces over-long lines that aren't ideal for diffs in tests. Easier to use something off-the-shelf and standard. Closes #7580. Performance is slower by about a factor of 10, but this isn't really a problem because native isn't suitable as a serialization format. (For serialization you should use json, because the reader is so much faster than native.)
2020-07-02Revert "Ipnyb: allow lossless round-tripping of markdown cell content."John MacFarlane1-3/+3
This reverts commit efbc2050315b60c8a753dee6255465f1083019ab.
2020-06-30Ipnyb: allow lossless round-tripping of markdown cell content.John MacFarlane1-3/+3
The reader now parses the contents of the markdown cell to a Pandoc structure, but *also* stores the raw markdown in a `source` attribute on the cell Div. When we convert back to markdown, this attribute is stripped off and the original source is used. When we convert to other formats, the attribute is usually ignored (though it will come through in HTML as a `data-source` attribute, not unhelpfully). I'll note some potential drawbacks of this approach: - It makes it impossible to use pandoc to clean up or change the contents of markdown cells, e.g. going from `+smart` to `-smart`. - There may be formats where the addition of the `source` attribute is problematic. I can't think of any, though. Closes #5408.
2019-03-09Include execution output in ipynb test.John MacFarlane3-6/+25
2019-03-09Ipynb reader/writer: better handling of cell metadata.John MacFarlane3-3/+8
We now handle even complex cell metadata in the Div's attributes. Simple metadata fields are rendered as a plain string, and complex ones as JSON.
2019-02-09Added simple ipynb reader/writer tests.John MacFarlane3-0/+92
Closes #5274.