Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

allow underscores in the jquery selector regexp

  • Loading branch information...
commit 0777036d17dde0f6531de92bd8c8ec61a8d5f0b5 1 parent e8ae518
@mattbaird authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 goquery.go
View
4 goquery.go
@@ -143,7 +143,7 @@ func name(c *selector, str string) {
}
func class(c *selector, str string) {
- r, err := regexp.Compile(`\.[a-zA-Z0-9\-]*`)
+ r, err := regexp.Compile(`\.[a-zA-Z0-9\-\_]*`)
if err != nil {
panic(err)
}
@@ -158,7 +158,7 @@ func class(c *selector, str string) {
}
func id(c *selector, str string) {
- r, err := regexp.Compile(`\#[a-zA-Z0-9\-]*`)
+ r, err := regexp.Compile(`\#[a-zA-Z0-9\-\_]*`)
if err != nil {
panic(err)
}
Please sign in to comment.
Something went wrong with that request. Please try again.