Skip to content

Fix - iOS/Android: Markdown is not formatted, parser worklet throws Property 'MAX_PARSABLE_LENGTH' doesn't exist - #822

Merged
jmusial merged 2 commits into
Expensify:mainfrom
jmusial:fix/example-app
Nov 5, 2026
Merged

jmusial merged 2 commits into
Expensify:mainfrom
jmusial:fix/example-app

Conversation

@jmusial

@jmusial jmusial commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Details

Fixes Property 'MAX_PARSABLE_LENGTH' doesn't exist, thrown by the parser worklet on iOS and Android when maxLength is omitted (regression from #775).

A worklet unpacks its captured variables in the function body, after default parameter values are evaluated, so maxLength = MAX_PARSABLE_LENGTH can't see the constant. The default now moves into the body (maxLength ?? MAX_PARSABLE_LENGTH).

Related Issues

#821

Manual Tests

Run the example app on iOS and Android, and verify the Markdown is formatted with no MAX_PARSABLE_LENGTH error. No unit test, because Jest doesn't run the parser as a worklet.

Screenshots

3-android-after-fix 3-ios-after-fix

Linked PRs

None.

@jmusial
jmusial requested a review from war-in October 30, 2026 16:14
@jmusial

jmusial commented Nov 2, 2026

Copy link
Copy Markdown
Contributor Author

Ahh, this needs to wait for #820, because of Playwright fail

@jmusial
jmusial merged commit 0dbe69e into Expensify:main Nov 5, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants