yassinedoghri / astro-i18next

An astro integration of i18next + some utility components to help you translate your astro websites!
https://astro-i18next.yassinedoghri.com
MIT License
473 stars 33 forks source link

pnpm exec astro-i18next generate - removes comments #170

Closed jav-ed closed 11 months ago

jav-ed commented 11 months ago

Describe the bug

Here is a snippet of my index.astro

<!-- ------------------------------- Note -------------------------------- -->
<Note />

After pnpm exec astro-i18next generate

the output will look like:

<!>--;
--;
--;
--;
--;
--;
--;
--;
--;
--;
--;
--;
--;
--;
--;
-- - Note--;
--;
--;
--;
--;
--;
--;
--;
--;
--;
--;
--;
--;
--;
--;
--;
-- >
    <Note>/>

Now this is not valid astro code anymore.

Expected behavior

Keep the comments as comments and do not interpret them as something else.

Context (please complete the following information):

Possible fixes At the step where the astro files in the pages' folder are modified, make sure to detect the comments and do not modify them