mirror of https://github.com/zulip/zulip.git
documentation_crawler: Stop treating all portico URLs as external.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
parent
51edc4bf4c
commit
586aaddcc0
|
@ -55,6 +55,14 @@ class APIDocumentationSpider(UnusedImagesLinterSpider):
|
|||
images_path = "static/images/api"
|
||||
|
||||
class PorticoDocumentationSpider(BaseDocumentationSpider):
|
||||
def _is_external_url(self, url: str) -> bool:
|
||||
return (
|
||||
not url.startswith('http://localhost:9981')
|
||||
or url.startswith('http://localhost:9981/help')
|
||||
or url.startswith('http://localhost:9981/api')
|
||||
or self._has_extension(url)
|
||||
)
|
||||
|
||||
name = 'portico_documentation_crawler'
|
||||
start_urls = ['http://localhost:9981/hello',
|
||||
'http://localhost:9981/history',
|
||||
|
|
|
@ -31,6 +31,10 @@ VNU_IGNORE = re.compile(r'|'.join([
|
|||
r'The first occurrence of ID “[^”]*” was here\.',
|
||||
r'Attribute “markdown” not allowed on element “div” at this point\.',
|
||||
r'No “p” element in scope but a “p” end tag seen\.',
|
||||
r'Element “div” not allowed as child of element “ul” in this context\. '
|
||||
+ r'\(Suppressing further errors from this subtree\.\)',
|
||||
r'The element “button” must not appear as a descendant of the “a” element\.',
|
||||
r'Attribute “href” not allowed on element “button” at this point\.',
|
||||
|
||||
# Warnings that are probably less important.
|
||||
r'The “type” attribute is unnecessary for JavaScript resources\.',
|
||||
|
|
Loading…
Reference in New Issue