Permalink
Browse files

allow underscores in the jquery selector regexp

  • Loading branch information...
1 parent e8ae518 commit 0777036d17dde0f6531de92bd8c8ec61a8d5f0b5 @mattbaird committed Oct 10, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 goquery.go
View
@@ -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)
}

0 comments on commit 0777036

Please sign in to comment.