Skip to content

Commit

Permalink
Fix minor updates with the presence of whitespace that could cause im…
Browse files Browse the repository at this point in the history
…properly formatted conf files.
  • Loading branch information
pyth0n1c committed May 10, 2024
1 parent 3505a8f commit 7f70fe3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion contentctl/output/conf_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def escapeNewlines(obj:Any):
# Failing to do so will result in an improperly formatted conf files that
# cannot be parsed
if isinstance(obj,str):
return obj.replace(f"\n","\\\n")
return obj.replace(f"\n"," \\\n")
else:
return obj

Expand Down
22 changes: 11 additions & 11 deletions contentctl/output/templates/es_investigations_investigations.j2
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,32 @@ disabled = 0
tokens = {\
{% for token in response_task.inputs %}
{% if token == 'user' %}
"user": {\
"valuePrefix": "\"",\
"valueSuffix": "\"",\
"delimiter": " OR {{ token }}=",\
"valueType": "primitive",\
"value": "identity",\
"default": "null"\
}\{% elif token == 'dest'%}
"user": {\
"valuePrefix": "\"",\
"valueSuffix": "\"",\
"delimiter": " OR {{ token }}=",\
"valueType": "primitive",\
"value": "identity",\
"default": "null"\
}{% elif token == 'dest'%}
"dest": {\
"valuePrefix": "\"",\
"valueSuffix": "\"",\
"delimiter": " OR {{ token }}=",\
"valueType": "primitive",\
"value": "asset",\
"default": "null"\
}\{% else %}
}{% else %}
"{{ token }}": {\
"valuePrefix": "\"",\
"valueSuffix": "\"",\
"delimiter": " OR {{ token }}=",\
"valueType": "primitive",\
"value": "file",\
"default": "null"\
}\{% endif %}{{ "," if not loop.last }}
}{% endif %}{{ "," if not loop.last }}\
{% endfor %}
}\
}\


{% endfor %}

0 comments on commit 7f70fe3

Please sign in to comment.