Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
fweikert committed Dec 6, 2024
1 parent 93e76f2 commit bf22763
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
12 changes: 9 additions & 3 deletions scripts/docs/rewriter.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,23 @@ def sub(m):


_PURE_HTML_FIXES = [_fix_html_links, _fix_html_metadata]
_PURE_MD_FIXES = [_fix_md_links_and_images, _fix_md_metadata, _set_header_vars]
_PURE_MD_FIXES = [_fix_md_links_and_images, _fix_md_metadata]
_PURE_YAML_FIXES = [_fix_yaml_paths]
_MD_AND_HTML_ONLY_FIXES = [_set_header_vars]

_FIXES = {
".html": _PURE_HTML_FIXES,
".md": _PURE_MD_FIXES + _PURE_HTML_FIXES,
".html": _PURE_HTML_FIXES + _MD_AND_HTML_ONLY_FIXES,
".md": _PURE_MD_FIXES + _PURE_HTML_FIXES + _MD_AND_HTML_ONLY_FIXES,
".yaml": _PURE_YAML_FIXES + _PURE_HTML_FIXES,
}


def _get_fixes(path):
# Ignore _buttons.html since it's updated by //scripts/docs:gen_new_toc
# (src/main/java/com/google/devtools/build/docgen/release/TableOfContentsUpdater.java).
if "_buttons.html" in path:
return None

_, ext = os.path.splitext(path)
return _FIXES.get(ext)

Expand Down
3 changes: 3 additions & 0 deletions site/command-line-reference-prefix.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@

<h1 class="page-title">Command-Line Reference</h1>

{% dynamic setvar source_file "site/command-line-reference-prefix.html" %}
{% include "_buttons.html" %}

<pre>
bazel [&lt;startup options&gt;] &lt;command&gt; [&lt;args&gt;]
</pre>
Expand Down

0 comments on commit bf22763

Please sign in to comment.