diff --git a/src/Console/Log.es6 b/src/Console/Log.es6 index 8899f73..6a56826 100644 --- a/src/Console/Log.es6 +++ b/src/Console/Log.es6 @@ -376,7 +376,7 @@ function formatEl(val) return `
${highlight(beautify.html(val.outerHTML), 'html')}`;
}
-var regUrl = /(^|[\s\n]|<[A-Za-z]*\/?>)((?:https?|ftp):\/\/[\-A-Z0-9+\u0026\u2019@#\/%?=()~_|!:,.;]*[\-A-Z0-9+\u0026@#\/%=~()_|])/gi;
+var regUrl = /(^|[\s\n]|<[A-Za-z]*\/?>)((?:https?|ftp):\/\/[-A-Z0-9+\u0026\u2019@#/%?=()~_|!:,.;]*[-A-Z0-9+\u0026@#/%=~()_|])/gi;
var recognizeUrl = str => str.replace(regUrl, '$2');
diff --git a/src/lib/highlight.es6 b/src/lib/highlight.es6
index 8b90317..cdb8bea 100644
--- a/src/lib/highlight.es6
+++ b/src/lib/highlight.es6
@@ -88,13 +88,13 @@ var language = {};
language.js = {
comment: {re: /(\/\/.*|\/\*([\s\S]*?)\*\/)/g, style: 'comment'},
string: {re: /(('.*?')|(".*?"))/g, style: 'string'},
- numbers: {re: /(\-?(\d+|\d+\.\d+|\.\d+))/g, style: 'number'},
+ numbers: {re: /(-?(\d+|\d+\.\d+|\.\d+))/g, style: 'number'},
keywords: {re: /(?:\b)(function|for|foreach|while|if|else|elseif|switch|break|as|return|this|class|self|default|var|false|true|null|undefined)(?:\b)/gi, style: 'keyword'},
- operators: {re: /(\+|\-|\/|\*|%|=|<|>|\||\?|\.)/g, style: 'operators'}
+ operators: {re: /(\+|-|\/|\*|%|=|<|>|\||\?|\.)/g, style: 'operators'}
};
language.html = {
- comment: {re: /(<!\-\-([\s\S]*?)\-\->)/g, style: 'comment'},
+ comment: {re: /(<!--([\s\S]*?)-->)/g, style: 'comment'},
tag: {re: /(<\/?\w(.|\n)*?\/?>)/g, style: 'keyword', embed: ['string']},
string: language.js.string,
css: {re: /(?:<style.*?>)([\s\S]*)?(?:<\/style>)/gi, language: 'css'},
@@ -104,8 +104,8 @@ language.html = {
language.css = {
comment: language.js.comment,
string: language.js.string,
- numbers: {re: /((\-?(\d+|\d+\.\d+|\.\d+)(%|px|em|pt|in)?)|#[0-9a-fA-F]{3}[0-9a-fA-F]{3})/g, style: 'number'},
- keywords: {re: /(@\w+|:?:\w+|[a-z\-]+:)/g, style: 'keyword'}
+ numbers: {re: /((-?(\d+|\d+\.\d+|\.\d+)(%|px|em|pt|in)?)|#[0-9a-fA-F]{3}[0-9a-fA-F]{3})/g, style: 'number'},
+ keywords: {re: /(@\w+|:?:\w+|[a-z-]+:)/g, style: 'keyword'}
};