Skip to content

Commit a5bd148

Browse files
authored
Update parser.py, add URL substring sanitization
1 parent c3a528b commit a5bd148

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/tensorflow_docs/api_generator/parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,7 @@ class FileLocation(object):
685685
@property
686686
def url(self) -> Optional[str]:
687687
if self.start_line and self.end_line:
688-
if self.base_url.startswith('https://github.com/'):
688+
if self.base_url and self.base_url.startswith('https://github.com/'):
689689
return f'{self.base_url}#L{self.start_line}-L{self.end_line}'
690690
return self.base_url
691691

0 commit comments

Comments
 (0)