martian
martian copied to clipboard
Paragraph text with multiple dollar amounts incorrectly creates an equation block.
Problem
Paragraph text with multiple dollar amounts incorrectly creates an equation block.
Working Example
markdownToBlock('A painting by John Doe sold for $9M at auction. A previous piece of his sold for $5M last year.');
Actual Result
Generated JSON block
[
{
"object": "block",
"type": "paragraph",
"paragraph": {
"rich_text": [
{
"type": "text",
"annotations": {
"bold": false,
"strikethrough": false,
"underline": false,
"italic": false,
"code": false,
"color": "default"
},
"text": {
"content": "A painting by John Doe sold for "
}
},
{
"type": "equation",
"annotations": {
"bold": false,
"strikethrough": false,
"underline": false,
"italic": false,
"code": false,
"color": "default"
},
"equation": {
"expression": "9M at auction. A previous piece of his sold for "
}
},
{
"type": "text",
"annotations": {
"bold": false,
"strikethrough": false,
"underline": false,
"italic": false,
"code": false,
"color": "default"
},
"text": {
"content": "5M last year."
}
}
]
}
}
]
Screenshot when saved to Notion API
Expected Result
[
{
"object": "block",
"type": "paragraph",
"paragraph": {
"rich_text": [
{
"type": "text",
"annotations": {
"bold": false,
"strikethrough": false,
"underline": false,
"italic": false,
"code": false,
"color": "default"
},
"text": {
"content": "A painting by John Doe sold for $9M at auction. A previous piece of his sold for $5M last year."
}
}
]
}
}
]