From 50499cd4cc05abb2122905cc11217c5ac7fe3b0e Mon Sep 17 00:00:00 2001 From: jasongao97 Date: Sun, 4 Feb 2024 15:12:44 +0800 Subject: [PATCH 1/2] Remove page number for whole chapter reference --- magicbook/stylesheets/components/typography.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/magicbook/stylesheets/components/typography.scss b/magicbook/stylesheets/components/typography.scss index c9c2da2a..ed3daf53 100644 --- a/magicbook/stylesheets/components/typography.scss +++ b/magicbook/stylesheets/components/typography.scss @@ -87,7 +87,7 @@ a { color: inherit; // Internal links - &:not([href^='http'])::after { + &:not([href^='http']):not([href$='#'])::after { content: ' (see page ' target-counter(attr(href), page) ')'; } From 36877f6897bc4f9ced1dd5848b4eb51560b517f8 Mon Sep 17 00:00:00 2001 From: jasongao97 Date: Sun, 4 Feb 2024 15:51:39 +0800 Subject: [PATCH 2/2] specify the links which include `#` but not at the end --- magicbook/stylesheets/components/typography.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/magicbook/stylesheets/components/typography.scss b/magicbook/stylesheets/components/typography.scss index ed3daf53..0e91ab5f 100644 --- a/magicbook/stylesheets/components/typography.scss +++ b/magicbook/stylesheets/components/typography.scss @@ -87,7 +87,8 @@ a { color: inherit; // Internal links - &:not([href^='http']):not([href$='#'])::after { + // for the ones include '#' but not at the end + &:not([href^='http'])[href*='#']:not([href$='#'])::after { content: ' (see page ' target-counter(attr(href), page) ')'; }