quicktype-core 23.0.25 → 23.0.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/language/Python.js +7 -1
- package/package.json +1 -1
package/dist/language/Python.js
CHANGED
|
@@ -200,7 +200,13 @@ class PythonRenderer extends ConvenienceRenderer_1.ConvenienceRenderer {
|
|
|
200
200
|
}
|
|
201
201
|
emitDescriptionBlock(lines) {
|
|
202
202
|
if (lines.length === 1) {
|
|
203
|
-
|
|
203
|
+
const docstring = (0, Source_1.modifySource)(content => {
|
|
204
|
+
if (content.endsWith('"')) {
|
|
205
|
+
return content.slice(0, -1) + '\\"';
|
|
206
|
+
}
|
|
207
|
+
return content;
|
|
208
|
+
}, lines[0]);
|
|
209
|
+
this.emitLine('"""', docstring, '"""');
|
|
204
210
|
}
|
|
205
211
|
else {
|
|
206
212
|
this.emitCommentLines(lines, "", undefined, '"""', '"""');
|