Skip to content

Commit

Permalink
Infer that <dfn><<length [0, 10px]>></dfn> must be a value, not a type
Browse files Browse the repository at this point in the history
  • Loading branch information
tabatkins committed Dec 19, 2023
1 parent 40e23e3 commit 6c07a4a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bikeshed/unsortedJunk.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,11 @@ def determineDfnType(doc: t.SpecT, dfn: t.ElementT, inferCSS: bool = False) -> s
):
return "value"
if text[0:1] == "<" and text[-1:] == ">":
return "type"
if "[" in text:
# has a range, *must* be a value
return "value"
else:
return "type"
if text[0:1] == ":":
return "selector"
if re.match(r"^[\w-]+\(.*\)$", text) and not (dfn.get("id") or "").startswith("dom-"):
Expand Down

0 comments on commit 6c07a4a

Please sign in to comment.