Skip to content

Commit

Permalink
Fix json test
Browse files Browse the repository at this point in the history
  • Loading branch information
facelessuser committed Nov 19, 2017
1 parent 6fd5d77 commit 34128f1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Main.sublime-menu
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"caption": "Settings",
"command": "edit_settings",
"args": {
"base_file": "${packages}/EasyDiff/easy_diff.sublime-settings",
"default": "// Settings in here override those in \"EasyDiff/easy_diff.sublime-settings\",\n\n{\n\t$0\n}\n"
"base_file": "${packages}/EasyDiff/easy_diff.sublime-settings",
"default": "// Settings in here override those in \"EasyDiff/easy_diff.sublime-settings\",\n\n{\n\t$0\n}\n"
}
},
{ "caption": "-" },
Expand Down
4 changes: 2 additions & 2 deletions support.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def run(self, page):
import mdpopups
import pymdownx
has_phantom_support = (mdpopups.version() >= (1, 10, 0)) and (int(sublime.version()) >= 3124)
fmatter = mdpopups.format_frontmatter(frontmatter) if pymdown.version[:3] >= (4, 3, 0) else ''
fmatter = mdpopups.format_frontmatter(frontmatter) if pymdownx.version[:3] >= (4, 3, 0) else ''
except Exception:
fmatter = ''
has_phantom_support = False
Expand Down Expand Up @@ -197,7 +197,7 @@ def run(self):
import mdpopups
import pymdownx
has_phantom_support = (mdpopups.version() >= (1, 10, 0)) and (int(sublime.version()) >= 3124)
fmatter = mdpopups.format_frontmatter(frontmatter) if pymdown.version[:3] >= (4, 3, 0) else ''
fmatter = mdpopups.format_frontmatter(frontmatter) if pymdownx.version[:3] >= (4, 3, 0) else ''
except Exception:
fmatter = ''
has_phantom_support = False
Expand Down
5 changes: 4 additions & 1 deletion tests/validate_json_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,10 @@ def check_format(self, file_name):
count = 1
for line in f:
indent_match = (RE_LINE_INDENT_TAB if self.use_tabs else RE_LINE_INDENT_SPACE).match(line)
end_comment = (comment_align is not None or indent_match.group(2)) and RE_COMMENT_END.search(line)
end_comment = (
(comment_align is not None or (indent_match and indent_match.group(2)))
and RE_COMMENT_END.search(line)
)
# Don't allow empty lines at file start.
if count == 1 and line.strip() == '':
self.log_failure(W_NL_START, count)
Expand Down

0 comments on commit 34128f1

Please sign in to comment.