PY-17333 Don't allow Docutils to parse indented first line specially
authorMikhail Golubev <mikhail.golubev@jetbrains.com>
Wed, 21 Oct 2015 17:05:25 +0000 (20:05 +0300)
committerMikhail Golubev <mikhail.golubev@jetbrains.com>
Sun, 25 Oct 2015 12:49:42 +0000 (15:49 +0300)
python/src/com/jetbrains/python/documentation/docstrings/PyStructuredDocstringFormatter.java

index 2d14aea962558d69bc907d1060599ea19c38d77e..4c0a21c0f5c8ae22170807ecdd492c49fe057379 100644 (file)
@@ -64,7 +64,7 @@ public class PyStructuredDocstringFormatter {
     if (module == null) return Lists.newArrayList();
     final List<String> result = new ArrayList<String>();
 
-    final String preparedDocstring = PyIndentUtil.removeCommonIndent(docstring, true);
+    final String preparedDocstring = PyIndentUtil.removeCommonIndent(docstring, true).trim();
 
     final HelperPackage formatter;
     final StructuredDocString structuredDocString;