Skip to content

[UR][Docs] Transform reference to macros in specs to links #18285

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 5, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions unified-runtime/scripts/generate_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def _find_enum_from_etor(etor, meta):

def _make_ref(symbol, symbol_type, meta):
"""make restructedtext reference from symbol."""
if not re.match(r"function|struct|union|enum|etor", symbol_type):
if not re.match(r"function|struct|union|enum|etor|macro", symbol_type):
return ""

ref = _fixup_tag(symbol)
Expand Down Expand Up @@ -180,7 +180,7 @@ def _generate_valid_rst(fin, fout, namespace, tags, ver, rev, meta, fast_mode):
line = tuple[2]
else:
# ignore reference links for specific types that have no API documentation for them.
if not re.match(r"env|handle|typedef|macro", symbol_type):
if not re.match(r"env|handle|typedef", symbol_type):
print(
"%s(%s) : warning : reference link %s (type=%s) not used."
% (fin, iline + 1, symbol, symbol_type)
Expand Down