File tree 2 files changed +6
-2
lines changed
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -1377,7 +1377,7 @@ def parse_category_name(self, category_name):
1377
1377
sys .exit (1 )
1378
1378
esc_ch = category_name [next_backslash + 1 ]
1379
1379
if esc_ch not in {'/' , '\\ ' }:
1380
- utils .LOGGER .error ("Unknown escape sequence '\\ {0}' in '{1}' at last position !" .format (esc_ch , category_name ))
1380
+ utils .LOGGER .error ("Unknown escape sequence '\\ {0}' in '{1}'!" .format (esc_ch , category_name ))
1381
1381
sys .exit (1 )
1382
1382
current += category_name [index :next_backslash ] + esc_ch
1383
1383
index = next_backslash + 2
Original file line number Diff line number Diff line change @@ -107,12 +107,16 @@ def gen_tasks(self):
107
107
categories = {}
108
108
for category in self .site .posts_per_category .keys ():
109
109
slug = tuple (self .slugify_category_name (category ))
110
+ for part in slug :
111
+ if len (part ) == 0 :
112
+ utils .LOGGER .error ("Category '{0}' yields invalid slug '{1}'!" .format (category , '/' .join (slug )))
113
+ sys .exit (1 )
110
114
if slug in categories :
111
115
other_category = categories [slug ]
112
116
utils .LOGGER .error ('You have categories that are too similar: {0} and {1}' .format (category , other_category ))
113
117
utils .LOGGER .error ('Category {0} is used in: {1}' .format (category , ', ' .join ([p .source_path for p in self .posts_per_category [category ]])))
114
118
utils .LOGGER .error ('Category {0} is used in: {1}' .format (other_category , ', ' .join ([p .source_path for p in self .posts_per_category [other_category ]])))
115
- pass
119
+ sys . exit ( 1 )
116
120
categories [slug ] = category
117
121
118
122
tag_list = list (self .site .posts_per_tag .items ())
You can’t perform that action at this time.
0 commit comments