Skip to content

Commit e520630

Browse files
authored
Support button-cells without tfo class (#2304)
1 parent 10eef0f commit e520630

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tools/tensorflow_docs/tools/nblint/style/tensorflow.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ def not_translation(args):
8181

8282
# Button checks
8383

84-
is_button_cell_re = re.compile(r"class.*tfo-notebook-buttons")
84+
# Look for class="tfo-notebook-buttons" (CSS used on website versions) or the
85+
# run-in-colab logo (for notebooks that stick to GitHub/Colab).
86+
is_button_cell_re = re.compile(r"class.*tfo-notebook-buttons|colab_logo_32px\.png")
8587

8688

8789
def get_arg_or_fail(user_args, arg_name, arg_fmt):

0 commit comments

Comments
 (0)