Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mvdan/xurls
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.0.0
Choose a base ref
...
head repository: mvdan/xurls
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.1.0
Choose a head ref
  • 17 commits
  • 10 files changed
  • 1 contributor

Commits on Dec 26, 2018

  1. README: fix 'go get' line

    I forgot that Go 1.11 and earlier don't know how to install Go modules
    globally. Revert to the old go get line, which does the right thing for
    most users not yet on modules.
    mvdan committed Dec 26, 2018
    Configuration menu
    Copy the full SHA
    795eb0c View commit details
    Browse the repository at this point in the history

Commits on Jan 19, 2019

  1. update TLDs and schemes

    mvdan committed Jan 19, 2019
    Configuration menu
    Copy the full SHA
    e73dfc8 View commit details
    Browse the repository at this point in the history

Commits on Feb 13, 2019

  1. update TLDs and schemes

    mvdan committed Feb 13, 2019
    Configuration menu
    Copy the full SHA
    48f3ccc View commit details
    Browse the repository at this point in the history

Commits on Mar 10, 2019

  1. update TLDs

    mvdan committed Mar 10, 2019
    Configuration menu
    Copy the full SHA
    49dda0b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    729290a View commit details
    Browse the repository at this point in the history
  3. CI: simplify config further

    mvdan committed Mar 10, 2019
    Configuration menu
    Copy the full SHA
    585be24 View commit details
    Browse the repository at this point in the history

Commits on Apr 12, 2019

  1. update TLDs and schemes

    mvdan committed Apr 12, 2019
    Configuration menu
    Copy the full SHA
    20723a7 View commit details
    Browse the repository at this point in the history

Commits on Jul 15, 2019

  1. update list of TLDs

    mvdan committed Jul 15, 2019
    Configuration menu
    Copy the full SHA
    32cda0c View commit details
    Browse the repository at this point in the history
  2. allow Relaxed to match punycode TLDs

    For example, it should match "test.xn--8y0a063a" just like it matches
    "test.联通".
    
    Instead of doubling the size of the regexp by adding the punycode
    version of every known TLD, simply match any valid punycode string which
    follows "xn--". It's highly unlikely that this would cause false
    positives.
    
    Fixes #27.
    mvdan committed Jul 15, 2019
    Configuration menu
    Copy the full SHA
    776b0d8 View commit details
    Browse the repository at this point in the history

Commits on Jul 18, 2019

  1. cmd/xurls: don't use bufio.Scanner to scan the input

    It was a convenient way to obtain the input in chunks, so that the tool
    could print urls incrementally without having to read the entirety of
    the input at once.
    
    Unfortunately, we failed to notie that bufio.Scanner has a hard limit on
    the size of each "token". In our particular case, it meant that any
    sequence of many thousands of input bytes without any whitespace could
    make the tool error out.
    
    Instead, use bufio.Reader, which grows a buffer to fit the data being
    read. Go back to reading one line at a time, as it can only stop at one
    specific byte like '\n', and not many of them like all whitespace
    characters.
    
    Fixes #28.
    mvdan committed Jul 18, 2019
    Configuration menu
    Copy the full SHA
    9058190 View commit details
    Browse the repository at this point in the history

Commits on Jul 26, 2019

  1. don't allow | as part of a URL

    This was an unintended bug added ages ago. In c64477d, we modified
    midChar to add \p{Po} to the character set. Unfortunately, we added |,
    essentially ending up with [somechars|\p{Po}]. In other words, | was now
    part of the set, while we only meant it as a regex "or" operator.
    
    Fix this, and add a test.
    
    Fixes #26.
    mvdan committed Jul 26, 2019
    Configuration menu
    Copy the full SHA
    9b4f670 View commit details
    Browse the repository at this point in the history

Commits on Jul 27, 2019

  1. use (?m) when looking for an end-of-line

    Without it, it only matches the end of the entire input.
    
    Fixes #28, again.
    mvdan committed Jul 27, 2019
    Configuration menu
    Copy the full SHA
    633779b View commit details
    Browse the repository at this point in the history

Commits on Sep 11, 2019

  1. switch to GitHub Actions for CI

    mvdan committed Sep 11, 2019
    Configuration menu
    Copy the full SHA
    0ca2609 View commit details
    Browse the repository at this point in the history

Commits on Sep 22, 2019

  1. README: use a better example

    Some users were repeating the regexp compile, so make that more obvious.
    Thanks to Kevin Burke for the idea.
    
    While at it, update the go.mod language version.
    
    Fixes #31.
    mvdan committed Sep 22, 2019
    Configuration menu
    Copy the full SHA
    e21d637 View commit details
    Browse the repository at this point in the history
  2. update TLDs and schemes

    mvdan committed Sep 22, 2019
    Configuration menu
    Copy the full SHA
    2427ea9 View commit details
    Browse the repository at this point in the history
  3. don't allow underscores and asterisks as end chars

    This way, we match URLs within markdown emphasis like *this* or _this_
    without the trailing character.
    
    It's highly unlikely that URLs would genuinely want to end in either of
    those characters. Asterisks are reserved, so they shouldn't be in the
    path to begin with. And underscores are most common in the middle of the
    path, and are already common to style plaintext at the start or end of
    URLs.
    
    Still allow them in the middle of URLs, because there's no reason not
    to.
    
    Fixes #29.
    mvdan committed Sep 22, 2019
    Configuration menu
    Copy the full SHA
    06587e4 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    aca318f View commit details
    Browse the repository at this point in the history
Loading