Permalink
Browse files

css: Update the 26.toChar hack to 2.10

  • Loading branch information...
1 parent 9f6f40c commit b8e4419d988d336f17837b0b537552fbe11f8131 @nafg nafg committed Sep 21, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 core/util/src/main/scala/net/liftweb/util/CssSelector.scala
View
3 core/util/src/main/scala/net/liftweb/util/CssSelector.scala
@@ -177,9 +177,10 @@ object CssSelectorParser extends PackratParsers with ImplicitConversions {
}
}
+ private val atEnd = Parser { in => if(in.atEnd) Success(CharSequenceReader.EofCh, in) else Failure("", in)}
private lazy val topParser: Parser[CssSelector] =
phrase(rep1((_idMatch | _nameMatch | _classMatch | _attrMatch | _elemMatch |
- _colonMatch | _starMatch) <~ (rep1(' ') | 26.toChar)) ~ opt(subNode)) ^^ {
+ _colonMatch | _starMatch) <~ (rep1(' ') | atEnd)) ~ opt(subNode)) ^^ {
case (one :: Nil) ~ sn => fixAll(List(one), sn)
case all ~ None if all.takeRight(1).head == StarSelector(Empty) =>
fixAll(all.dropRight(1), Some(KidsSubNode()))

0 comments on commit b8e4419

Please sign in to comment.