Skip to content

Commit

Permalink
Merge branch 'master' into clojure-support
Browse files Browse the repository at this point in the history
  • Loading branch information
mwouts authored Feb 27, 2019
2 parents 09584e7 + dda117f commit 94e71f1
Show file tree
Hide file tree
Showing 12 changed files with 903 additions and 27 deletions.
7 changes: 7 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
Release History
---------------

1.0.2 (2019-02-??)
++++++++++++++++++++++

**BugFixes**
- Allow spaces between ``?`` or ``!`` and python or bash command (#189)


1.0.1 (2019-02-23)
++++++++++++++++++++++

Expand Down
8 changes: 8 additions & 0 deletions jupytext/contentsmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,14 @@ def trust_notebook(self, path):

def rename_file(self, old_path, new_path):
"""Rename the current notebook, as well as its alternative representations"""
if old_path not in self.paired_notebooks:
try:
# we do not know yet if this is a paired notebook (#190)
# -> to get this information we open the notebook
self.get(old_path, content=True)
except Exception:
pass

if old_path not in self.paired_notebooks:
super(TextFileContentsManager, self).rename_file(old_path, new_path)
return
Expand Down
1 change: 1 addition & 0 deletions jupytext/languages.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
'.cpp': {'language': 'c++', 'comment': '//'},
'.ss': {'language': 'scheme', 'comment': ';;'},
'.clj': {'language': 'clojure', 'comment': ';;'},
'.scm': {'language': 'scheme', 'comment': ';;'},
'.sh': {'language': 'bash', 'comment': '#'},
'.q': {'language': 'q', 'comment': '/'}}

Expand Down
2 changes: 1 addition & 1 deletion jupytext/magics.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
_COMMENT = {_SCRIPT_EXTENSIONS[ext]['language']: _SCRIPT_EXTENSIONS[ext]['comment'] for ext in _SCRIPT_EXTENSIONS}

# Commands starting with a question or exclamation mark have to be escaped
_PYTHON_HELP_OR_BASH_CMD = re.compile(r"^(# |#)*(\?|!)[A-Za-z]")
_PYTHON_HELP_OR_BASH_CMD = re.compile(r"^(# |#)*(\?|!)\s*[A-Za-z]")

_PYTHON_MAGIC_CMD = re.compile(r"^(# |#)*({})(\s|$)".format('|'.join(
# posix
Expand Down
2 changes: 1 addition & 1 deletion jupytext/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Jupytext's version number"""

__version__ = '1.0.1'
__version__ = '1.0.2-dev'
Loading

0 comments on commit 94e71f1

Please sign in to comment.