Respec: var highlight overmatches

Created on 20 Apr 2019  路  7Comments  路  Source: w3c/respec

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.

bug

Most helpful comment

Example:

Screenshot 2019-04-22 18 04 05

All 7 comments

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:

Screenshot 2019-04-22 18 04 05

Ah, okay, explicit redeclaration. Thanks for the example.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

marcoscaceres picture marcoscaceres  路  6Comments

marcoscaceres picture marcoscaceres  路  4Comments

marcoscaceres picture marcoscaceres  路  5Comments

saschanaz picture saschanaz  路  3Comments

saschanaz picture saschanaz  路  5Comments