fixed bug.
This commit is contained in:
@@ -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]
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user