feat: improve notes imports by using de-gfm -4. Related to #3851. (#3930)

This commit is contained in:
Robert Sparks 2022-05-03 18:04:48 -05:00 committed by GitHub
parent 3606dbef38
commit d4ebbe41e8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -95,8 +95,8 @@ def de_gfm(source: str):
Calls de-gfm from the kramdown-rfc2629 gem.
"""
result = subprocess.run(
[settings.DE_GFM_BINARY,],
stdout=subprocess.PIPE, # post-Python 3.7, this can be replaced with capture_output=True
[settings.DE_GFM_BINARY, "-4"],
capture_output=True,
input=source,
encoding='utf8',
check=True,
@ -123,4 +123,4 @@ class NoteNotFound(NoteError):
class InvalidNote(NoteError):
default_message = 'Note data invalid'
default_message = 'Note data invalid'