Description
When using docs +update with the default v1 API, the markdown parser handles underscore (_) escaping differently from v2 and from what the lark-doc-md.md reference documents.
Steps to Reproduce
- Create a document with content containing double underscores (e.g., Python dunder methods):
lark-cli docs +update --doc "<doc_id>" --mode overwrite --markdown @content.md
Where content.md contains a table like:
| Operator | Name |
|----------|------|
| aten::__ior__ | dunder_ior |
-
With escaped underscores (\_\_ior\_\_): The backslashes are rendered literally in the document, showing \_\_ior\_\_ instead of __ior__.
-
Without escaping (__ior__): The content displays correctly as __ior__.
Expected Behavior
According to the lark-doc-md.md skill reference, _ is listed as an "unconditionally escaped character" that must be escaped with \_ at any position. This rule appears to only apply to the v2 API (--api-version v2 --doc-format markdown), but the documentation does not clearly state this distinction.
Actual Behavior
- v1 API (default): Escaped underscores
\_ are rendered literally (backslashes visible in document). Unescaped underscores work correctly.
- v2 API: Escaping works as documented.
Suggestion
Please clarify in the documentation that the escaping rules in lark-doc-md.md apply specifically to the v2 API, or unify the behavior between v1 and v2.
Environment
- lark-cli version:
@larksuite/cli@1.0.33
- OS: Linux
Description
When using
docs +updatewith the default v1 API, the markdown parser handles underscore (_) escaping differently from v2 and from what thelark-doc-md.mdreference documents.Steps to Reproduce
lark-cli docs +update --doc "<doc_id>" --mode overwrite --markdown @content.mdWhere
content.mdcontains a table like:With escaped underscores (
\_\_ior\_\_): The backslashes are rendered literally in the document, showing\_\_ior\_\_instead of__ior__.Without escaping (
__ior__): The content displays correctly as__ior__.Expected Behavior
According to the
lark-doc-md.mdskill reference,_is listed as an "unconditionally escaped character" that must be escaped with\_at any position. This rule appears to only apply to the v2 API (--api-version v2 --doc-format markdown), but the documentation does not clearly state this distinction.Actual Behavior
\_are rendered literally (backslashes visible in document). Unescaped underscores work correctly.Suggestion
Please clarify in the documentation that the escaping rules in
lark-doc-md.mdapply specifically to the v2 API, or unify the behavior between v1 and v2.Environment
@larksuite/cli@1.0.33