fixed bug.

This commit is contained in:
Yoshihiro OKUMURA
2020-01-14 09:54:15 +09:00
parent f09170b16d
commit 900ff9bb67
2 changed files with 5 additions and 1 deletions
+3
View File
@@ -1,5 +1,8 @@
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . /index.html [L]
+2 -1
View File
@@ -90,8 +90,9 @@ const transform = (node: object, idx: number): ReactElement | null | void => {
const download = (node_.attribs && node_.attribs['download']) || '';
const rel = (node_.attribs && node_.attribs['rel']) || '';
const klass = (node_.attribs && node_.attribs['class']) || '';
const target = (node_.attribs && node_.attribs['target']) || '';
const isFile = download !== '' || /\.(zip|pdf|png|gif|jpg|gz|bz2|xz|mpg|mp3|mp4)$/i.test(url);
const isExternal = /external/.test(rel) || /external/.test(klass) || /^(mailto|https?:?\/\/)/.test(url);
const isExternal = /^(_blank|_top|_parent)$/.test(target) || /external/.test(rel) || /external/.test(klass) || /^(mailto|https?:?\/\/)/.test(url);
if (!isFile && !isExternal) {
const style = (node_.attribs && node_.attribs['style']) || '';
const title = (node_.attribs && node_.attribs['title']) || null;