-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support custom parsing logic (pass worklet as parser
prop)
#439
base: main
Are you sure you want to change the base?
Conversation
android/src/main/java/com/expensify/livemarkdown/LiveMarkdownModule.java
Outdated
Show resolved
Hide resolved
android/src/main/java/com/expensify/livemarkdown/LiveMarkdownModule.java
Outdated
Show resolved
Hide resolved
android/src/main/java/com/expensify/livemarkdown/LiveMarkdownModule.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🪨
#ifdef RCT_NEW_ARCH_ENABLED | ||
RCTScheduler *scheduler = [surfacePresenter_ scheduler]; | ||
commitHook_ = std::make_shared<MarkdownCommitHook>(scheduler.uiManager); | ||
installed_ = YES; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this can be removed (and the property as well)
auto json = rt.global().getPropertyAsObject(rt, "JSON").getPropertyAsFunction(rt, "stringify").call(rt, result).asString(rt).utf8(rt); | ||
jni::alias_ref<jni::JString> input, | ||
int parserId) { | ||
const auto markdownRuntime = expensify::livemarkdown::getMarkdownRuntime(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any chance to somehow indicate here that this method is synchronized
and mutex isn't necessary here?
Details
This PR removes separate JS bundle with ExpensiMark logic and allows for customizing
MarkdownTextInput
formatting logic viaparser
property. Parser needs to be a function that accepts a plaintext string and returns an array of ranges.Related Issues
#317
Manual Tests
Linked PRs