Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: t-8ch/taterm
base: d83bdf5010
...
head fork: t-8ch/taterm
compare: f2bf613361
  • 2 commits
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Showing with 10 additions and 9 deletions.
  1. +10 −9 taterm.vala
View
19 taterm.vala
@@ -15,16 +15,17 @@ class taterm : Gtk.Application
static const string hex_encode = "%[0-9A-F]{2}";
static const string common_chars = "\\\\a-z0-9-._~!$&'()*+,;=";
static const string regex_string =
- "([a-z0-9][a-z0-9+.-]+):" + // scheme
- "(//)?" + //it has an authority
- "(([:"+common_chars+"]|"+hex_encode+")*@)?" + //userinfo
- "(["+common_chars+"]|"+hex_encode+")*" + //host
- "(:\\d{1,5})?" + //port
- "(/([:@/"+common_chars+")]|"+hex_encode+")*)?" + //path
-
+ "(?<=[$\\s({\"\'.,;])" + // look behind
+ "([a-z0-9][a-z0-9+.-]+):" + // scheme
+ "(//)?" + // it has an authority
+ "(([:"+common_chars+"]|"+hex_encode+")*@)?" + // userinfo
+ "(["+common_chars+"]|"+hex_encode+"){3,}" + // host
+ "(:\\d{1,5})?" + // port
+ "(/([:@/"+common_chars+")]|"+hex_encode+")*)?" + // path
// v be flexible with shell escaping here
- "(\\\\?\\?(["+common_chars+":/?@]|"+hex_encode+")*)?" + //query string
- "(\\\\?\\#(["+common_chars+"+:/?@]|"+hex_encode+")*)?" //fragment
+ "(\\\\?\\?(["+common_chars+":/?@]|"+hex_encode+")*)?" + // query string
+ "(\\\\?\\#(["+common_chars+"+:/?@]|"+hex_encode+")*)?" + // fragment
+ "(?=[\\s)}\"\',;]?)" // look ahead
;
public taterm()

No commit comments for this range

Something went wrong with that request. Please try again.