---
jupyter:
jupytext:
text_representation:
extension: .Rmd
format_name: rmarkdown
---
Some text.
<!-- #region {"some_meta": "yes", "more_meta": "affirmative"} -->
Region cell with one-line header comment.
<!-- #endregion -->
More text.
<!-- #region {"some_meta": "yes",
"more_meta": "affirmative"} -->
Region cell with multi-line header comment.
<!-- #endregion -->
Notice it has two near-identical cell-delimiting HTML comment blocks, where one has a leading comment marker that is all on one line, and the second has the same comment marker, but split over two lines. Jupytext parses this to ipynb as:
Notice that the one-line HTML comment cell does get parsed as its own cell with metadata, but the two-line HTML comment cell does not, and remains as an HTML comment inside an embedding Markdown cell.
The one-line and two-line HTML header comments seem syntactically identical, and my text editor will insert line-breaks automatically in long comments, so it would be a great help if the RMarkdown -> ipynb parser would read both comments as valid meta-data specifiers for new cells. Is that practical?
Hi @matthew-brett , thank you for suggesting this! I've not had much time lately, but when possible I will see if I can do something about this. Thanks
Consider the following RMarkdown notebook:
Notice it has two near-identical cell-delimiting HTML comment blocks, where one has a leading comment marker that is all on one line, and the second has the same comment marker, but split over two lines. Jupytext parses this to ipynb as:
Notice that the one-line HTML comment cell does get parsed as its own cell with metadata, but the two-line HTML comment cell does not, and remains as an HTML comment inside an embedding Markdown cell.
The one-line and two-line HTML header comments seem syntactically identical, and my text editor will insert line-breaks automatically in long comments, so it would be a great help if the RMarkdown -> ipynb parser would read both comments as valid meta-data specifiers for new cells. Is that practical?
I suppose may be related to https://github.com/mwouts/jupytext/issues/1012