Skip to content

Commit

Permalink
feat: fix link regexp bug
Browse files Browse the repository at this point in the history
  • Loading branch information
scorpiotzh committed Jun 14, 2022
1 parent af408f4 commit 7d3865e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dns.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func (d *DNSData) updateDNSRecord(contentRecord dao.TableRecordsInfo) (dao.Table
value := contentRecord.Value
// compatible with ipfs://xxx sia://xxx https://ipfs.io/ipfs/xxx
if contentRecord.Key == "sia" || contentRecord.Key == "ipfs" {
re := regexp.MustCompile(`([0-9A-Za-z]{46})`)
re := regexp.MustCompile(`([0-9A-Za-z-]{46})`)
if results := re.FindStringSubmatch(value); len(results) == 2 {
value = results[1]
}
Expand Down

0 comments on commit 7d3865e

Please sign in to comment.