HTML paragraph closing tag </p> grayed out after 994 characters

When typing more than 994 characters wrapped in

, the closing tag

doesn’t have it’s default code color, instead it’s grayed out. Would like to know if anyone else is able to replicate this issue and why this happens.

Atom is designed to not handle long lines because big files have caused tremendous performance issues in the past (hanging and crashing forever, because the user then closes Atom with the big file open and hasn’t done research on how to dump Atom’s session memory because they aren’t used to programs that require it). You are running into a hard limit and there’s no way for you or anyone to change it without modifying code. The limit may be removed or altered in the future, since some significant improvements have been and are being developed, but I have no way of knowing when or if that’ll be the case.

Fortunately for you, HTML doesn’t really care about whitespace. So you can break your paragraph up, or nest the body of the text at the next indentation level in a new line, then unindent with a new line for the </p>.

Could you please post text I can copy to reproduce this? The long line issue should have been fixed by Tree-sitter grammars.

1 Like

When typing more than 994 characters wrapped in<p>, the closing tag </p>
doesn’t have it’s default code color, instead it’s grayed out. Would like to know if anyone else is able to replicate this issue and why this happens.

I’m confused. Do you need more explanation?

I’m going to ask again:

No. Your explanation is enough. My second post was a fix of the first, but got posted 2 days later. I’m a new user so It blocked me after the first post for security reasons.

Try to replicate this issue by copy pasting this and save it as anyname.php
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla convallis malesuada tortor vitae malesuada. Aenean tempus magna a ex finibus, sed dapibus nulla finibus. Phasellus quis ex a sem congue efficitur. Phasellus massa risus, finibus quis malesuada ac, dictum faucibus dui. Pellentesque bibendum dui eu quam tincidunt, sit amet ultrices elit consectetur. Duis facilisis cursus diam. Mauris eu ipsum at enim venenatis tristique id ac urna. Donec bibendum semper enim sed laoreet. Proin in suscipit urna, a interdum quam. Duis ante odio, suscipit quis aliquam eget, dictum vitae ex. Etiam vulputate sodales nisl, id dignissim lorem auctor nec.Duis maximus neque vel blandit ullamcorper. Fusce sit amet est urna. Phasellus aliquet, leo ut blandit faucibus, arcu diam facilisis nisi, a blandit lorem eros ut diam. Integer dictum lobortis sapien dictum varius. Nam faucibus lacus in facilisis dictum. Vestibulum ut aliquet quam. Maecenas justo mi, ultricies ut convallis facilisis massa nunc.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla convallis malesuada</p>

I don’t see a problem with your example

When you place the cursor in the text and run the command (in the command palette) Editor: Log Cursor Syntax Tree Scope what do you see?

Edit:

You mean a PHP file then? That does not have a core Tree-sitter grammar yet (though I know it is being worked on, so it may come soon). Until then, adding a newline will fix highlighting issues caused by long lines. E.g.,

<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla convallis malesuada tortor vitae malesuada. Aenean tempus magna a ex finibus, sed dapibus nulla finibus. Phasellus quis ex a sem congue efficitur. Phasellus massa risus, finibus quis malesuada ac, dictum faucibus dui. Pellentesque bibendum dui eu quam tincidunt, sit amet ultrices elit consectetur. Duis facilisis cursus diam.
   Mauris eu ipsum at enim venenatis tristique id ac urna. Donec bibendum semper enim sed laoreet. Proin in suscipit urna, a interdum quam. Duis ante odio, suscipit quis aliquam eget, dictum vitae ex. Etiam vulputate sodales nisl, id dignissim lorem auctor nec. Duis maximus neque vel blandit ullamcorper. Fusce sit amet est urna. Phasellus aliquet, leo ut blandit faucibus, arcu diam facilisis 
   nisi, a blandit lorem eros ut diam. Integer dictum lobortis sapien dictum varius. Nam faucibus lacus in facilisis dictum. Vestibulum ut aliquet quam. Maecenas justo mi, ultricies ut convallis facilisis massa nunc.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla convallis malesuada
</p>
1 Like