Skip to content

Commit

Permalink
Linking remaining IDL built-in types that aren't caught by another fu…
Browse files Browse the repository at this point in the history
…nction.
  • Loading branch information
tabatkins committed Sep 25, 2020
1 parent ccf9e40 commit 428ace3
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions bikeshed/idl.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,17 @@ def markup_keyword(self, text, construct):
else:
# Otherwise, you *can* point to/dfn stringification behavior if you want.
return ("<idl data-export data-idl-type=dfn data-idl-for='{0}' data-lt='stringification behavior' id='{0}-stringification-behavior'>".format(construct.parent.full_name), "</idl>")
# The remaining built-in types that aren't covered by a more specific function.
builtinTypes = {
"any":"interface",
"sequence":"dfn",
"record":"dfn",
"Promise":"interface",
"FrozenArray":"interface",
"ObservableArray":"interface",
}
if text in builtinTypes:
return (f'<a data-link-spec=webidl data-link-type="{builtinTypes[text]}">', '</a>')
return (None, None)

def markup_name(self, text, construct):
Expand Down

0 comments on commit 428ace3

Please sign in to comment.