Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiline comment color bug #7081

Open
WilsonPercival opened this issue Dec 22, 2023 · 0 comments
Open

Multiline comment color bug #7081

WilsonPercival opened this issue Dec 22, 2023 · 0 comments

Comments

@WilsonPercival
Copy link

Problem description

When I paste this code here, the multiline comment is the wrong color:

https://codemirror.net/5/mode/javascript/index.html

let a = 0;

class Lol
{
	static c()
	{










































































































































































































































	}

	static b()
	{

	}

	static a()
	{
		a++;
		a++;

		if (false)
		{
			a++;
			a++;

			if (false)
			{
				/*Lol.c({a: "", opts: {
					a: false,
					b: false,
					c: {
						a: false,
						b: async () => {
							a++;

							const b = await Lol.c({a: false, b: {"a": false, "b": "false"}, c: false});
							if (b.c(false)) return;

							Lol.c({a: false, b: {c: false, d: Lol["s"], e: {d: false, f: () => Lol.c()}}});
						},
					},
					x: async () => {
						const a = await Lol.c({b: false, s: {"lol": false, "kek": false}, g: false});
						if (Lol.c(false)) return;

						Lol.c();
					},
				}});*/
				
				a++;
				a++;
				a++;
				a++;
				a++;
				a++;
				a++;
				a++;
				a++;
				a++;
				a++;
				a++;
				a++;
				a++;
				a++;
			}
		}
	}
}

Observed result

observed

Expected result

This part of the code is commented out and should be the same color:

/*Lol.c({a: "", opts: {
	a: false,
	b: false,
	c: {
		a: false,
		b: async () => {
			a++;

			const b = await Lol.c({a: false, b: {"a": false, "b": "false"}, c: false});
			if (b.c(false)) return;

			Lol.c({a: false, b: {c: false, d: Lol["s"], e: {d: false, f: () => Lol.c()}}});
		},
	},
	x: async () => {
		const a = await Lol.c({b: false, s: {"lol": false, "kek": false}, g: false});
		if (Lol.c(false)) return;

		Lol.c();
	},
}});*/

Affected browsers/platforms: Chrome 120.0.6099.111, Windows 11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant