@tasksai/install 0.1.24 → 0.1.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/runtime/server.py +20 -5
package/package.json
CHANGED
package/runtime/server.py
CHANGED
|
@@ -125,7 +125,7 @@ if not LICENSE_KEY:
|
|
|
125
125
|
print("Find your key in your purchase confirmation email.", file=sys.stderr, flush=True)
|
|
126
126
|
sys.exit(1)
|
|
127
127
|
|
|
128
|
-
SERVER_VERSION = "2.4.
|
|
128
|
+
SERVER_VERSION = "2.4.1"
|
|
129
129
|
|
|
130
130
|
AUTH_HEADERS = {
|
|
131
131
|
"Authorization": f"Bearer {LICENSE_KEY}",
|
|
@@ -952,7 +952,7 @@ def add_labeled_fact(doc, label, value):
|
|
|
952
952
|
def iter_inline_markdown(text):
|
|
953
953
|
"""Yield (text, marks) spans for common inline Markdown."""
|
|
954
954
|
token_re = re.compile(
|
|
955
|
-
r"(`[^`]+`|\*\*[^*]+\*\*|__[^_]+__|\*[^*\s][^*]*\*|_[^_\s][^_]*_|\[[^\]]+\]\([^)]+\))"
|
|
955
|
+
r"(`[^`]+`|\*\*[^*]+\*\*|__[^_]+__|\*[^*\s][^*]*\*|(?<!\w)_[^_\s][^_]*_(?!\w)|\[[^\]]+\]\([^)]+\))"
|
|
956
956
|
)
|
|
957
957
|
pos = 0
|
|
958
958
|
for match in token_re.finditer(text):
|
|
@@ -1140,9 +1140,6 @@ def add_markdown_table(doc, rows, alignments):
|
|
|
1140
1140
|
table.style = "Table Grid"
|
|
1141
1141
|
table.autofit = True
|
|
1142
1142
|
repeat_table_header(table.rows[0])
|
|
1143
|
-
for table_row in table.rows:
|
|
1144
|
-
prevent_table_row_split(table_row)
|
|
1145
|
-
|
|
1146
1143
|
for row_index, row in enumerate(normalized):
|
|
1147
1144
|
for column_index, value in enumerate(row):
|
|
1148
1145
|
cell = table.cell(row_index, column_index)
|
|
@@ -1280,6 +1277,7 @@ def write_docx(path, title, content_markdown, product_name):
|
|
|
1280
1277
|
continue
|
|
1281
1278
|
|
|
1282
1279
|
heading = re.match(r"^(#{1,4})\s+(.+)$", stripped)
|
|
1280
|
+
standalone_bold_heading = re.fullmatch(r"\*\*([^*\n]{1,120})\*\*", stripped)
|
|
1283
1281
|
inferred_heading = inferred_plain_heading_level(lines, index)
|
|
1284
1282
|
bullet = re.match(r"^(\s*)[-*+]\s+(.+)$", line)
|
|
1285
1283
|
numbered = re.match(r"^(\s*)\d+\.\s+(.+)$", line)
|
|
@@ -1294,6 +1292,19 @@ def write_docx(path, title, content_markdown, product_name):
|
|
|
1294
1292
|
else None
|
|
1295
1293
|
)
|
|
1296
1294
|
|
|
1295
|
+
if re.fullmatch(r"<!--\s*[^\n]*?\s*-->", stripped):
|
|
1296
|
+
# Public-copy delimiters and other machine-readable Markdown
|
|
1297
|
+
# comments are useful in the source but must not appear in the
|
|
1298
|
+
# downloadable customer document.
|
|
1299
|
+
flush_paragraph()
|
|
1300
|
+
index += 1
|
|
1301
|
+
continue
|
|
1302
|
+
if stripped == ">":
|
|
1303
|
+
# A blank line inside a Markdown blockquote is structural spacing,
|
|
1304
|
+
# not a literal greater-than character in the Word document.
|
|
1305
|
+
flush_paragraph()
|
|
1306
|
+
index += 1
|
|
1307
|
+
continue
|
|
1297
1308
|
if is_markdown_table_start(lines, index):
|
|
1298
1309
|
flush_paragraph()
|
|
1299
1310
|
header = markdown_table_row(lines[index])
|
|
@@ -1320,6 +1331,10 @@ def write_docx(path, title, content_markdown, product_name):
|
|
|
1320
1331
|
doc.add_heading(heading_text, level=min(len(heading.group(1)), 4))
|
|
1321
1332
|
keep_checklist_together = "checklist" in heading_text.casefold()
|
|
1322
1333
|
index += 1
|
|
1334
|
+
elif standalone_bold_heading:
|
|
1335
|
+
flush_paragraph()
|
|
1336
|
+
doc.add_heading(standalone_bold_heading.group(1).strip(), level=3)
|
|
1337
|
+
index += 1
|
|
1323
1338
|
elif inferred_heading:
|
|
1324
1339
|
flush_paragraph()
|
|
1325
1340
|
doc.add_heading(stripped, level=inferred_heading)
|