Skip to content

Commit 58229fe

Browse files
committed
Fix python script
1 parent e5ca788 commit 58229fe

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

scripts/build_npm_readme.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,15 @@ def replace_admonition(match):
6464
{'emoji': '❗', 'color': '#0075ff'})
6565

6666
# Create an HTML block that looks similar to Github's admonition
67+
content = '\n'.join(content_lines)
6768
return f'''<div style="background-color: #f6f8fa; border-left: 4px solid {style['color']}; padding: 15px; margin: 15px 0; border-radius: 3px;">
68-
<p style="margin: 0 0 10px 0; color: {style['color']};">
69-
<strong>{style['emoji']} {admonition_type}:</strong>
70-
</p>
69+
<p style="margin: 0 0 10px 0; color: {style['color']};">
70+
<strong>{style['emoji']} {admonition_type}:</strong>
71+
</p>
7172
72-
{'\n'.join(content_lines)}
73+
{content}
7374
</div>\n'''
74-
75+
7576
return re.sub(pattern, replace_admonition, text, flags=re.MULTILINE)
7677

7778
def convert_internal_links(text, base_url="https://github.com/CarlosNZ/json-edit-react"):

0 commit comments

Comments
 (0)