Skip to content

Commit

Permalink
WIP Add support for Sage
Browse files Browse the repository at this point in the history
(language_info is missing in sample notebook)
  • Loading branch information
mwouts committed Feb 2, 2021
1 parent a2f1409 commit 5cb93ed
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/languages.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Jupytext works with notebooks in any of the following languages:
- R
- Robot Framework
- Rust/Evxcr
- Sage
- Scala
- Scheme
- Script of Script
Expand Down
1 change: 1 addition & 0 deletions jupytext/languages.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
".sos": {"language": "sos", "comment": "#"},
".java": {"language": "java", "comment": "//"},
".groovy": {"language": "groovy", "comment": "//"},
".sage": {"language": "sage", "comment": "#"},
}

_COMMENT_CHARS = [
Expand Down
22 changes: 22 additions & 0 deletions tests/notebooks/ipynb_sage/sage_print_hello.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"print(\"Hello world\")"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "SageMath 9.2",
"language": "sage",
"name": "sagemath"
}
},
"nbformat": 4,
"nbformat_minor": 2
}

0 comments on commit 5cb93ed

Please sign in to comment.