We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6d92e31 commit a1e8de3Copy full SHA for a1e8de3
nbdev/diff.py
@@ -0,0 +1,14 @@
1
+"""Get ipynb diffs by cell"""
2
+
3
+# AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/api/19_diff.ipynb.
4
5
+# %% auto 0
6
+__all__ = ['source_diff']
7
8
+# %% ../nbs/api/19_diff.ipynb
9
+def source_diff(
10
+ old_source, # Original source string
11
+ new_source # New source string
12
+): # Unified diff string
13
+ "Return unified diff string for source change"
14
+ return '\n'.join(unified_diff(old_source.splitlines(), new_source.splitlines(), lineterm=''))
0 commit comments