Skip to content
This repository was archived by the owner on Apr 6, 2026. It is now read-only.

Commit a807cdb

Browse files
committed
fix format
1 parent 3559a94 commit a807cdb

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

MaxBridge/max_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import signal
99
import requests
1010
import io
11-
from .md import parse_markdown
11+
from md import parse_markdown
1212

1313
class MaxAPI:
1414
"""

MaxBridge/md.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@ def process_match(match, md_type):
2020
)
2121

2222
format = {
23-
"type": md_type,
23+
2424
"from": actual_offset,
2525
"length": len(match.group(1)),
26+
"attributes": {}
2627
}
2728
if md_type == 'LINK':
2829
format['attributes']['url'] = match.group(2)
@@ -33,7 +34,7 @@ def process_match(match, md_type):
3334

3435
text = re.sub(r'\[(.*?)\]\((?P<url>.*?)\)', lambda m: process_match(m, "LINK"), text)
3536
text = re.sub(r'\*(.*?)\*', lambda m: process_match(m, "STRONG"), text)
36-
text = re.sub(r'/(.*?)/', lambda m: process_match(m, "ITALIC"), text)
37+
# text = re.sub(r'/(.*?)/', lambda m: process_match(m, "ITALIC"), text) # no italic yet
3738
text = re.sub(r'_(.*?)_', lambda m: process_match(m, "UNDERLINE"), text)
3839

3940
return result, text.strip()

0 commit comments

Comments
 (0)