Open lawrencet149 opened 1 year ago
This issue also exist for the languages that only have block comments (maxima and ocaml) and this does not seem to be a major issue. Having the SAS language as part of jupytext is still a very a good addition, regardless if the light script issue exist.
Hello Tony, thanks for letting me know.
Yes sure I will be glad to help ! Could you please share an example ? I mean, a sample cell and the corresponding incorrect SAS file ?
By the way, do you see any issue with the sas:percent
format? Maybe you could use that one while we fix this issue?
Also I let me explain why the light
format wraps the code cells that contain blank lines with cell markers: this is because in absence of explicit markers, the light
format creates the .ipynb
cells based on code paragraph. Without the markers we could not achieve round trip consistency.
Hello Tony, thanks for letting me know.
Yes sure I will be glad to help ! Could you please share an example ? I mean, a sample cell and the corresponding incorrect SAS file ?
By the way, do you see any issue with the
sas:percent
format? Maybe you could use that one while we fix this issue?
No issues with sas:percent. sas:percent is what I actually use for my sas projects.
Screen shot using sas:percent:
Screen shot using sas:light
This is using the same .ipynb file. As you can see from the light version, the last half of the code becomes commented out.
Totally understand why the cell markers are needed. One solution I was thinking about is to also allow for another key "cell_markers" in languages.py in the _SCRIPT_EXTENSIONS dictionary. Thoughts?
".sas" : { "language": "sas", "comment": "/", "comment_suffix": "/", "cell_markers": "/+/,/-/" }
It does look like that one can currently provide this value on the metadata section.
Hi,
I am finding issues with the light script pairing for the SAS language. Whenever the first line of code in a cell is an empty line, jupytext adds cell_markers that makes the sas script invalid. Is there a way to not make light script format available for .sas file or change the default cell markers if the script is a sas file? The issue was not caught during the test because the notebook used has a SAS comment after the cell_marker which still rendered a valid sas script. Any help is appreciated.
Thanks, Tony