Skip to content

Commit

Permalink
Apply dedent to descriptions (#416) (#464)
Browse files Browse the repository at this point in the history
  • Loading branch information
yurihs authored and axnsan12 committed Nov 14, 2019
1 parent 9966297 commit 456b697
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/drf_yasg/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import inspect
import logging
import sys
import textwrap
from collections import OrderedDict
from decimal import Decimal

Expand Down Expand Up @@ -438,6 +439,9 @@ def force_real_str(s, encoding='utf-8', strings_only=False, errors='strict'):
if type(s) != str:
s = '' + s

# Remove common indentation to get the correct Markdown rendering
s = textwrap.dedent(s)

return s


Expand Down

0 comments on commit 456b697

Please sign in to comment.