Skip to content

Commit 428ace3

Browse files
committed
Linking remaining IDL built-in types that aren't caught by another function.
1 parent ccf9e40 commit 428ace3

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

bikeshed/idl.py

+11
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,17 @@ def markup_keyword(self, text, construct):
125125
else:
126126
# Otherwise, you *can* point to/dfn stringification behavior if you want.
127127
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>")
128+
# The remaining built-in types that aren't covered by a more specific function.
129+
builtinTypes = {
130+
"any":"interface",
131+
"sequence":"dfn",
132+
"record":"dfn",
133+
"Promise":"interface",
134+
"FrozenArray":"interface",
135+
"ObservableArray":"interface",
136+
}
137+
if text in builtinTypes:
138+
return (f'<a data-link-spec=webidl data-link-type="{builtinTypes[text]}">', '</a>')
128139
return (None, None)
129140

130141
def markup_name(self, text, construct):

0 commit comments

Comments
 (0)