Skip to content

Commit 203b3ec

Browse files
fix: add trailing newline after endhint block for GitBook rendering
1 parent 63e961d commit 203b3ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/scripts/convert_for_gitbook.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def replace_callout(match):
5454
body = match.group(2)
5555
lines = re.sub(r'^> ?', '', body, flags=re.MULTILINE).strip()
5656
style = style_map.get(callout_type, 'info')
57-
return f'{{% hint style="{style}" %}}\n{lines}\n{{% endhint %}}'
57+
return f'{{% hint style="{style}" %}}\n{lines}\n{{% endhint %}}\n'
5858

5959
pattern = r'> \[!(\w+)\]\s*\n((?:>[ \t]?[^\n]*\n)*)'
6060
return re.sub(pattern, replace_callout, content)

0 commit comments

Comments
 (0)