summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/util/langhelpers.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2019-03-05 11:34:03 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2019-03-05 11:35:15 -0500
commit837d9640049be78473e2afa360cf9bfbfee91a5c (patch)
tree1309066c3d78a5d1dbccf7b96f219491506b5738 /lib/sqlalchemy/util/langhelpers.py
parentcfaf830a6f85fd08ec969ad7cb5d4617a46f62d5 (diff)
downloadsqlalchemy-837d9640049be78473e2afa360cf9bfbfee91a5c.tar.gz
- repair param inject to work around code examples to some degree
- link to correct text() construct for CheckConstraint Change-Id: Ic46d1f79670a532f33bd9feb7f568dc3d1d6e38a
Diffstat (limited to 'lib/sqlalchemy/util/langhelpers.py')
-rw-r--r--lib/sqlalchemy/util/langhelpers.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/sqlalchemy/util/langhelpers.py b/lib/sqlalchemy/util/langhelpers.py
index 198a23a59..efc950f1d 100644
--- a/lib/sqlalchemy/util/langhelpers.py
+++ b/lib/sqlalchemy/util/langhelpers.py
@@ -1649,6 +1649,12 @@ def inject_param_text(doctext, inject_params):
lines.append(to_inject)
lines.append("\n")
to_inject = None
+ elif line.endswith("::"):
+ # TODO: this still wont cover if the code example itself has blank
+ # lines in it, need to detect those via indentation.
+ lines.append(line)
+ lines.append(doclines.pop(0)) # the blank line following a code example
+ continue
lines.append(line)
return "\n".join(lines)