File tree Expand file tree Collapse file tree 4 files changed +9
-5
lines changed Expand file tree Collapse file tree 4 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 178
178
" #| exports\n " ,
179
179
" def _add_nls(s):\n " ,
180
180
" \" Add newlines to start and end of `s` if missing\"\n " ,
181
+ " if not s: return s\n " ,
181
182
" if s[ 0]!='\\ n': s = '\\ n'+s\n " ,
182
183
" if s[-1]!='\\ n': s = s+'\\ n'\n " ,
183
184
" return s"
316
317
" <document index=\" 1\" >\n " ,
317
318
" <source>\n " ,
318
319
" b8898fab\n " ,
319
- " </source> \n " ,
320
+ " \n " ,
320
321
" <document_content>\n " ,
321
322
" This is a sample\n " ,
322
323
" </document_content>\n " ,
372
373
" <document index=\" 1\" >\n " ,
373
374
" <source>\n " ,
374
375
" b8898fab\n " ,
375
- " </source> \n " ,
376
+ " \n " ,
376
377
" <document_content>\n " ,
377
378
" This is a sample\n " ,
378
379
" </document_content>\n " ,
379
380
" </document>\n " ,
380
381
" <document index=\" 2\" >\n " ,
381
382
" <source>\n " ,
382
383
" doc.txt\n " ,
383
- " </source> \n " ,
384
+ " \n " ,
384
385
" <document_content>\n " ,
385
386
" And another one\n " ,
386
387
" </document_content>\n " ,
Original file line number Diff line number Diff line change 1
1
[DEFAULT]
2
2
repo = toolslm
3
3
lib_name = toolslm
4
- version = 0.0.4
4
+ version = 0.0.5
5
5
min_python = 3.9
6
6
license = apache2
7
7
black_formatting = False
@@ -35,3 +35,5 @@ clean_ids = True
35
35
clear_all = False
36
36
conda_user = fastai
37
37
console_scripts = folder2ctx =toolslm.xml:folder2ctx_cli
38
+ cell_number = True
39
+
Original file line number Diff line number Diff line change 1
- __version__ = "0.0.4 "
1
+ __version__ = "0.0.5 "
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ def build_xml(data, parent):
37
37
# %% ../00_xml.ipynb 11
38
38
def _add_nls (s ):
39
39
"Add newlines to start and end of `s` if missing"
40
+ if not s : return s
40
41
if s [ 0 ]!= '\n ' : s = '\n ' + s
41
42
if s [- 1 ]!= '\n ' : s = s + '\n '
42
43
return s
You can’t perform that action at this time.
0 commit comments