Skip to content

Commit

Permalink
freeze_metadata option only updates jupytext metadata #124
Browse files Browse the repository at this point in the history
  • Loading branch information
mwouts committed Nov 12, 2018
1 parent e78fc8c commit 121d81b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions jupytext/jupytext.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,9 @@ def reads(self, s, **_):
lines = lines[pos:]

if self.freeze_metadata:
metadata['jupytext'] = {'metadata_filter': {
'notebook': {'additional': list(metadata.keys()), 'excluded': 'all'}}}
metadata['jupytext']['metadata_filter']['cells'] = {
'additional': list(cell_metadata), 'excluded': 'all'}
metadata.setdefault('jupytext', {})['metadata_filter'] = {
'notebook': {'additional': list(metadata.keys()), 'excluded': 'all'},
'cells': {'additional': list(cell_metadata), 'excluded': 'all'}}

set_main_and_cell_language(metadata, cells, self.format.extension)

Expand Down

0 comments on commit 121d81b

Please sign in to comment.