Skip to content
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

Fix: LinkClickHandler does not work when clicking a link in the markdown list #143

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mbkim95
Copy link

@mbkim95 mbkim95 commented Jun 13, 2024

There is an issue with the LinkClickHandler not working properly when a link is placed inside a markdown list, as in the example above.

I found that the process of parsing the markdown syntax and converting it to ASTs works recursively. In this case, if the type of AST node is AstUnorderedList or AstOrderedList, it calls the FormattedList() Composable function, which calls the BasicRichText function inside the FormattedList() Composable function. However, the linkClickHandler parameter of the BasicRichText()Composable function is not used, so the LinkClickHandler registered by the user is not working properly. Rather, the LinkClickHandler is becoming null.

Inside the FormattedList() Composable function, I also modified the LocalLinkClickHandler to accept a user-registered LinkClickHandler and pass it to the BasicRichText() Composable function.

Please review the modified code.

Thank you

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.

1 participant