Skip to content

Commit

Permalink
MarkdownBear: Rename remark_configs_plugins
Browse files Browse the repository at this point in the history
Rename `remark_configs_plugins` to `remark_lint_configs` because
the latter is more appropriate and future addition of plugins
may conflict with the former name.
  • Loading branch information
yash-nisar committed Jul 18, 2017
1 parent 2a21048 commit d83fe5f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions bears/markdown/MarkdownBear.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,21 +130,21 @@ def create_arguments(filename, file, config_file,
'ruleSpaces': horizontal_rule_spaces, # Bool
'ruleRepetition': horizontal_rule_repeat, # int
}
remark_configs_plugins = {}
remark_lint_configs = {}

if max_line_length:
remark_configs_plugins['maximumLineLength'] = max_line_length
remark_lint_configs['maximumLineLength'] = max_line_length

config_json = json.dumps(remark_configs_settings)
# Remove { and } as remark adds them on its own
settings = config_json[1:-1]

args = [filename, '--no-color', '--quiet', '--setting', settings]

if remark_configs_plugins:
config_json = json.dumps(remark_configs_plugins)
plugins = 'lint=' + config_json[1:-1]
args += ['--use', plugins]
if remark_lint_configs:
config_json = json.dumps(remark_lint_configs)
lint = 'lint=' + config_json[1:-1]
args += ['--use', lint]

if check_links:
args += ['--use', 'validate-links']
Expand Down

0 comments on commit d83fe5f

Please sign in to comment.