Skip to content

Commit 0b9c4d0

Browse files
Merge pull request #12 from rabix/bugfix/docstring_too_long
Bugfix/docstring too long
2 parents 5f228f8 + 686a928 commit 0b9c4d0

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

wrabbit/parser/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ def __str__(self):
188188
# This part contains constants related to image generation for Markdown
189189

190190
# Find Markdown images
191-
REGEX_MD_IMAGE = r'((?:!|)\[([^\[\]]+)]\(([^\[\]\(\)]+\.((?:jpe?g|png)))({opt}#gh-{image_mode}-mode-only|)((?:#sbg_.*|))\))'
191+
REGEX_MD_IMAGE = r'((?:!|)\[([^\[\]]+)]\(([^\[\]\(\)]+\.((?:jpe?g|png)))({opt}#gh-{image_mode}-mode-only|)((?:#sbg_.*|))(?:\s[^\s]+|)\))'
192192
# Find <p><img> in HTML
193193
REGEX_HTML_IMAGE = r'(?:<p(?:[^>]+)>.*?)<img[^>]+>(?:.*?</p>)'
194194
# Find <h><picture> in HTML

wrabbit/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.3.0"
1+
__version__ = "0.3.1"

wrabbit/wrapper/wrapper.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,9 @@ def add_hint(self, hint):
165165
self.hints.append(hint)
166166

167167
def add_docs(self, doc):
168-
self.doc = doc
168+
# Newline character protects the first line in the CWL from being too
169+
# long. If the first line is too long this sometimes causes errors.
170+
self.doc = "\n" + doc
169171

170172
def add_revision_note(self, note):
171173
self.revision_note = note

0 commit comments

Comments
 (0)