Skip to content

Multiline comment color bug #7081

@WilsonPercival

Description

@WilsonPercival

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions