-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Description
A feature I appreciate, particularly in WHATWG-style specs with their heavy-algorithmic style, is the ability to click on a variable and get all of its instances highlighted in the same color, to easily track where the var is used in an algo. This works on all the non-HTML whatwg specs, since they're all Bikeshedded, but Wattsi doesn't have the same functionality.
This is done entirely in CSS/JS, so it should be trivially exportable to Wattsi; see the code at https://github.com/tabatkins/bikeshed/blob/main/bikeshed/unsortedJunk.py#L303. The only thing you might need to change is to remove the check that bails if the variable is document-global; I don't think the HTML spec annotates its algorithms with a useful scoping container (like Bikeshed pushes you towards with the algorithm attribute), so they're all document-global. That'll be fine, it'll just mean that coloring a variable in one algo might result in other algos starting out with some of their variables colored as well.