Can't remove only class when class merging disabled
Nobody has claimed this yet.
- Dominant language
- Scala
- Stars
- 1.3k
- Forks
- 275
- PR merge metrics
- No merged PRs in 30d
Description
As [discussed on the mailing list](https://groups.google.com/d/topic/liftweb/qN4VThXAsXw/discussion):
Using Lift 2.5-M3, with the example from issue #1312, the following code removes the "removeme" class, as expected:
```
(".removeme !!" #> ("td [class!]" #> "removeme")).apply(Hi)
```
Produces:
```
NodeSeq(Hi)
```
However, if the "removeme" class is the only class, it is not removed:
```
(".removeme !!" #> ("td [class!]" #> "removeme")).apply(Hi)
```
Produces:
```
NodeSeq(Hi)
```
The consensus seems to be that this is a bug.
Thanks,
Kevin
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the two Lift selector examples in the issue, comparing removal when the td has multiple classes versus only "removeme". Locate the implementation behind the "td [class!]" transformation and add a regression test showing that the sole class is removed, then verify the output no longer contains the class attribute or value.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100