markdownr 0.5.20 → 0.5.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/markdown_server/app.rb +2 -2
- data/lib/markdown_server/version.rb +1 -1
- data/views/layout.erb +2 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8453e4e0a362ba8e9c10523c1de11a0372971eedacaadc399a37dd3971f20a20
|
|
4
|
+
data.tar.gz: da228300eee2d6e8e03a2d1e501a8ff6fc7ee27bb83706254a8abe7354c5e1d6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ac8aefdee7fefc43e3d9282cd612b5a0e8ac9b96e7ab7c710cc8e2d52da10e58d48b03aaf2c35938b87eed09243f98f70528c45eadc841f331ae36cc3a2c3797
|
|
7
|
+
data.tar.gz: cabbff0b16dae2e73ad37339c66bdf231684e53469c782151bc0099414c97d02660f015b92a38f112d433e83b9286ba1a91cf5a52cf59bbc5355e2be79c82fc5
|
data/lib/markdown_server/app.rb
CHANGED
|
@@ -787,8 +787,8 @@ module MarkdownServer
|
|
|
787
787
|
|
|
788
788
|
# Returns true when serving an HTML file that should have popup assets injected.
|
|
789
789
|
# Add additional path prefixes here as needed.
|
|
790
|
-
def inject_assets_for_html_path?(
|
|
791
|
-
|
|
790
|
+
def inject_assets_for_html_path?(_relative_path)
|
|
791
|
+
true
|
|
792
792
|
end
|
|
793
793
|
|
|
794
794
|
# Injects popup CSS and JS into an HTML document before </body>.
|
data/views/layout.erb
CHANGED
|
@@ -2104,6 +2104,7 @@
|
|
|
2104
2104
|
var href = anchor.getAttribute('href');
|
|
2105
2105
|
if (!href || isAnchorOnly(href)) { hidePopup(); return; }
|
|
2106
2106
|
if (!anchor.closest('.md-content') && !anchor.closest('.frontmatter')) { hidePopup(); return; }
|
|
2107
|
+
if (!isLocalMd(href) && !isExternal(href)) { hidePopup(); return; }
|
|
2107
2108
|
e.preventDefault();
|
|
2108
2109
|
handleLink(anchor, e.clientX, e.clientY);
|
|
2109
2110
|
});
|
|
@@ -2126,6 +2127,7 @@
|
|
|
2126
2127
|
var href = anchor.getAttribute('href');
|
|
2127
2128
|
if (!href || isAnchorOnly(href)) { hidePopup(); return; }
|
|
2128
2129
|
if (!anchor.closest('.md-content') && !anchor.closest('.frontmatter')) { hidePopup(); return; }
|
|
2130
|
+
if (!isLocalMd(href) && !isExternal(href)) { hidePopup(); return; }
|
|
2129
2131
|
e.preventDefault();
|
|
2130
2132
|
var touch = e.changedTouches[0];
|
|
2131
2133
|
handleLink(anchor, touch.clientX, touch.clientY);
|