Skip to content

Commit

Permalink
Fixing a bug in documentary
Browse files Browse the repository at this point in the history
  • Loading branch information
pylover committed Apr 24, 2018
1 parent 7d4165b commit d103319
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions bddrest/documentary/documenter.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@ def write_response(self, formatter, response):

if response.body:
formatter.write_header('Body', 4)
if response.content_type:
mime = 'json' if 'json' in response.content_type else ''
formatter.write_paragraph(f'```{mime}\n```')

formatter.write_paragraph(f'```{response.text}\n```')
mime = ''
if response.content_type and 'json' in response.content_type:
mime = 'json'
formatter.write_paragraph(f'```{mime}\n{response.text}\n```')

def document(self, story, outfile):
basecall = story.base_call
Expand Down

0 comments on commit d103319

Please sign in to comment.