[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #58407] JavaScript parser stops at template literal inside JSX tag
From: |
INVALID.NOREPLY |
Subject: |
[bug #58407] JavaScript parser stops at template literal inside JSX tag |
Date: |
Tue, 19 May 2020 22:06:02 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:76.0) Gecko/20100101 Firefox/76.0 |
URL:
<https://savannah.gnu.org/bugs/?58407>
Summary: JavaScript parser stops at template literal inside
JSX tag
Project: GNU gettext
Submitted by: whiteinge
Submitted on: Wed 20 May 2020 02:06:00 AM UTC
Category: JavaScript
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
Similar to bug #50920, the file parser stops when it encounters a JavaScript
template literal inside of a JSX tag.
As a child of a tag:
const App = () => (
<div>
_('one');
{`${'foo'}`}
_('two');
</div>
)
As an attribute inside a tag:
_('one');
<div className={`${'foo'}`} />
_('two');
Tested on 0.20.2.
Tested using: xgettext -o - template-literal-jsx-repro1.js
Expected output:
#: template-literal-jsx-repro1.js:3
msgid "one"
msgstr ""
#: template-literal-jsx-repro1.js:5
msgid "two"
msgstr ""
Actual output:
#: template-literal-jsx-repro1.js:3
msgid "one"
msgstr ""
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Wed 20 May 2020 02:06:00 AM UTC Name: template-literal-jsx-repro1.js
Size: 84B By: whiteinge
<http://savannah.gnu.org/bugs/download.php?file_id=49127>
-------------------------------------------------------
Date: Wed 20 May 2020 02:06:00 AM UTC Name: template-literal-jsx-repro2.js
Size: 51B By: whiteinge
<http://savannah.gnu.org/bugs/download.php?file_id=49128>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?58407>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bug #58407] JavaScript parser stops at template literal inside JSX tag,
INVALID.NOREPLY <=