Given:
<section>
<p>|varA|.</p>
<section>
<p>|varA|</p>
</section>
</section>
The second |varA| shouldn't be highlighted, because it's in a new sub section.
Meaning they are different variables? I suspect that would confuse readers...
Yes, they are different. Indeed, it鈥檚 confusing. I鈥檒l try to send a fix tomorrow.
To be clear, I think readers may falsely consider they are same because of the name, even after the fix. What would be the use case here?
Ah, no. It鈥檚 pretty clear they are not. You can take a look at Payment Request API to see that clearly. There are visual cues in each section to indicate they are self-contained: for example, heading, algorithms contain lines and indenting, etc. When the overmatching on vars happens, it鈥檚 pretty clear there is some kind of bug.
(Sorry for lack of images and links to clearly show the problem - on my phone. Will post some tomorrow)
Example:

Ah, okay, explicit redeclaration. Thanks for the example.
Most helpful comment
Example: