Skip to content

Commit

Permalink
fix: add processing for raw cells in ipynb
Browse files Browse the repository at this point in the history
  • Loading branch information
macite committed Jul 18, 2023
1 parent 3bd9107 commit ebacf38
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/views/layouts/jupynotex.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ def _proc_src(self, content):
result.extend(MARKDOWN_BEGIN)
result.extend(line.replace('```markdown', '```md').strip() for line in source)
result.extend(MARKDOWN_END)
elif content['cell_type'] == 'raw':
result.extend(_verbatimize(source))
else:
raise ValueError(
"Cell type not supported when processing source: {!r}".format(
Expand Down
8 changes: 8 additions & 0 deletions test_files/submissions/vectorial_graph.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -929,6 +929,14 @@
"source": [
"Testing with invalid latex $10 in markdown cell"
]
},
{
"attachments": {},
"cell_type": "raw",
"metadata": {},
"source": [
"Testing a raw cell with $10 invalid latex code"
]
}
],
"metadata": {
Expand Down

0 comments on commit ebacf38

Please sign in to comment.