I have merged cells in a Notebook
file.
Is there a way to split such a merged cell group back to single cells, in each of them being one command?
Answer
Put this code after your merged cell and evaluate, it should print below all expressions separately.
I don't know how solid it is but worth a try:
Composition[
Scan[NotebookWrite[EvaluationNotebook[], Cell[#, "Input"]] &, #] &,
Thread,
DeleteCases[#, "\[IndentingNewLine]" | "\n", {2}] &,
First,
NotebookRead
] @ PreviousCell[]
Comments
Post a Comment