unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#41696: 27.0.91; comment-line in js-jsx-mode does not handle ReactJS markup
@ 2020-06-03 23:56 Brian Leung
  2020-10-22 13:21 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Brian Leung @ 2020-06-03 23:56 UTC (permalink / raw)
  To: 41696

[-- Attachment #1: Type: text/plain, Size: 629 bytes --]

With the following example code:

import * as React from "react";
import { render } from "react-dom";

const App = () => {
  return (
    <React.StrictMode>
      <div>Hello</div>
    </React.StrictMode>
  );
};

render(<App />, document.getElementById("root"));


If you move to the live with the <div> and call M-x comment-line, the
line is commented out with two forward slashes, instead of the proper

{{/* <div>Hello</div> */}}

In GNU Emacs 27.0.91 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20)
Windowing system distributor 'The X.Org Foundation', version 11.0.12008000
System Description: NixOS 20.09 (Nightingale)

[-- Attachment #2: Type: text/html, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#41696: 27.0.91; comment-line in js-jsx-mode does not handle ReactJS markup
  2020-06-03 23:56 bug#41696: 27.0.91; comment-line in js-jsx-mode does not handle ReactJS markup Brian Leung
@ 2020-10-22 13:21 ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2020-10-22 13:21 UTC (permalink / raw)
  To: Brian Leung; +Cc: 41696

Brian Leung <bkleung89@gmail.com> writes:

> If you move to the live with the <div> and call M-x comment-line, the
> line is commented out with two forward slashes, instead of the proper
>
> {{/* <div>Hello</div> */}}

I know nothing about JSX, but googling for three seconds seems to say
that the comment syntax is

{/* <div>Hello</div> */}

?  In any case, I've now made js-jsx-mode comment lines in this way if
inside a JSX block.  But like I said, I don't really know the language,
so it'd be nice if somebody else gave it a look-over.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-10-22 13:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-03 23:56 bug#41696: 27.0.91; comment-line in js-jsx-mode does not handle ReactJS markup Brian Leung
2020-10-22 13:21 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).