Add rule for wordpress seo plugin (fixes #132)

pull/111/head
MattIPv4 5 years ago
parent 9465e8a2fb
commit 8921cd711f

@ -32,6 +32,9 @@ export default global => {
deny: 'all', deny: 'all',
}; };
config['# WordPress: SEO plugin'] = '';
config['location ~* ^/wp-content/plugins/wordpress-seo(?:-premium)?/css/main-sitemap\\.xsl$'] = {};
config['# WordPress: deny wp-content/plugins (except earlier rules)'] = ''; config['# WordPress: deny wp-content/plugins (except earlier rules)'] = '';
config['location ~ ^/wp-content/plugins'] = { config['location ~ ^/wp-content/plugins'] = {
deny: 'all', deny: 'all',

@ -107,7 +107,9 @@ export default entriesOrObject => {
// Single linebreak between comment and block // Single linebreak between comment and block
.replace(/^([^\S\r\n]*#.*)(?:\n[^\S\r\n]*)+\n([^\S\r\n]*.*{)/gm, '$1\n$2') .replace(/^([^\S\r\n]*#.*)(?:\n[^\S\r\n]*)+\n([^\S\r\n]*.*{)/gm, '$1\n$2')
// Double linebreak after double comment // Double linebreak after double comment
.replace(/^([^\S\r\n]*#.*\n[^\S\r\n]*#.*\n)([^\S\r\n]*[^#\s])/gm, '$1\n$2'); .replace(/^([^\S\r\n]*#.*\n[^\S\r\n]*#.*\n)([^\S\r\n]*[^#\s])/gm, '$1\n$2')
// No newline for empty blocks
.replace(/^([^\S\r\n]*.*{)\n[^\S\r\n]*(})/gm, '$1$2');
// Cleanup extra linebreaks between multiple close blocks // Cleanup extra linebreaks between multiple close blocks
// Use a loop as this has overlapping matches // Use a loop as this has overlapping matches

Loading…
Cancel
Save