This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type ClientId = string | |
declare class ExtendableEvent extends Event { | |
waitUntil(r: Promise<any>): void; | |
} | |
declare class FetchEvent extends ExtendableEvent{ | |
request: Request; | |
readonly clientId: ClientId; | |
get preloadResponse(): Promise<Response|void>; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
import os | |
summary = open("book/SUMMARY.md", "r").read().splitlines() | |
order = ["SUMMARY.md"] | |
for summary_line in summary: | |
pattern = re.compile(r" *[\*\-] ?\[(.+)\] ?\((.+)\)") | |
if re.match(pattern, summary_line): |