How to apply escaping blackslash to md or mdx files

We use mdx v3 format for our documentation site under Docusaurus platform.
I encountered some compilation issues during the build process because of some characters such as { or < found in markdown files.

NOTE: The { character is used for opening JavaScript expressions whereas the < character is used for opening JSX tags. Thus, if MDX finds the expression inside { } or <> invalid, it will fail.

For example, I can’t get Crowdin to retain “\” between “]” and “{” in the following expression:
\[\]\{uint, \[33\]byte\} \(Go\)
Crowdin simply renders this string as []{uint, [33]byte} (Go) when generating md file.

I could find some parser configuration parameters related to escaping but all belong to Java properties.

Is there any way to do this type of escaping in md/mdx file?

1 Like

Hi @klaytn.docs ! Could you please share the link to the string in your project as an example? or at least the string itself here and let us know the file name where it is located

OK, here is the information you requested:

  1. Project URL: Translating Klaytn-Docs to Korean language - Crowdin
  2. File location: docs > learn > accounts.md
  3. Sample files
    • English source file: accounts_en.md
    • Korean translation file: accounts_ko.md
  4. Target string
    • En: line 202 \[\]\{uint, \[33\]byte\} \(Go\)
    • Ko: line 205 []{uint, [33]byte} (Go)

Hi @klaytn.docs ,

Thanks for the details! We will check everything and get back to you with an update

Any update? (I’d like to know whether it belongs to tips&tricks or feature&fix as well.)

Hi @klaytn.docs,

Sorry for the delay, still checking with the team. We appreciate your patience and will update you as soon as possible

Just let me know whether or not it’s something that needs a fix or implementation on your side, please. It’s because I need to look for a workaround myself if I can’t get one from you or this community.

We’re investigating this on our side, but it is weekend and developers are out of the office

1 Like

While I wait for a new feature or fix for this from Crowdin, is there anyone who had the same problem and ran into a workaround or interim solution?

Hi, can you please share the progress, if any?

Maybe, you don’t a plan for supporting this kind of feature for the moment due to the lack of bandwidth or something. Or it’s included in TODO already but not started yet. Or still implementing and testing (if this is the case, let me know estimated date if possible). Any kind of update would be appreciated a great deal.

Our CI pipeline from Crowdin to Github has been broken in part. We need to make a additional PRs repeatedly whenever an automatic “New Crowdin updates” PR that contains the problematic files has been approved.

Sorry for another reminder.
Thanks in advance!

Hello @klaytn.docs!

Our devs are currently looking into possible solutions for this issue.

Please also share what instrument you used to compile the source file. It’ll help our devs with the investigation.

Waiting for your reply,

Thank you for the feedback.
We use yarn build for compilation using Github actions.
You can see the details about the compilation errors here which were resolved by restoring escaping backslashes.

Any update on this?

Thanks in advance!

Hi @klaytn.docs,

I can see that the task is already done. Could you please check if everything works fine on your side?

Looking forward to hearing from you,

1 Like