mirror of
https://github.com/leoncvlt/loconotion.git
synced 2024-08-30 18:12:12 +00:00
Merge pull request #18 from candu/master
Support for Notion inline "alias" links
This commit is contained in:
commit
d9d8009be7
@ -34,6 +34,12 @@ div[role="button"]:not(.notion-record-icon):hover {
|
|||||||
padding-right: unset !important;
|
padding-right: unset !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* pull alias arrows back inline */
|
||||||
|
svg.alias {
|
||||||
|
display: inline-block !important;
|
||||||
|
height: auto !important;
|
||||||
|
}
|
||||||
|
|
||||||
@media only screen and (max-width: 960px) {
|
@media only screen and (max-width: 960px) {
|
||||||
/* normalizes banner / page title width */
|
/* normalizes banner / page title width */
|
||||||
.notion-scroller > div:not([class]),
|
.notion-scroller > div:not([class]),
|
||||||
|
@ -555,8 +555,10 @@ class Parser:
|
|||||||
# find sub-pages and clean slugs / links
|
# find sub-pages and clean slugs / links
|
||||||
sub_pages = []
|
sub_pages = []
|
||||||
for a in soup.findAll("a"):
|
for a in soup.findAll("a"):
|
||||||
if a["href"].startswith("/"):
|
sub_page_href = a["href"]
|
||||||
|
if sub_page_href.startswith("/"):
|
||||||
sub_page_href = "https://www.notion.so" + a["href"]
|
sub_page_href = "https://www.notion.so" + a["href"]
|
||||||
|
if sub_page_href.startswith("https://www.notion.so/"):
|
||||||
# if the link is an anchor link,
|
# if the link is an anchor link,
|
||||||
# check if the page hasn't already been parsed
|
# check if the page hasn't already been parsed
|
||||||
if "#" in sub_page_href:
|
if "#" in sub_page_href:
|
||||||
|
Loading…
Reference in New Issue
Block a user