x0Lazarus
f687e5659e
Recognize form feeds between HTML classes
2026-09-28 17:18:34 -07:00
dualfroz
b4ef68dec8
fix: remove every occurrence of a repeated class
...
RemoveClass deleted each class with one strings.ReplaceAll pass over the
space-wrapped class list. Two adjacent occurrences share the space
between them, so " a a " holds only one non-overlapping " a " and the
second survived: RemoveClass("a") on class="a a" returned with
HasClass("a") still true. ToggleClass used the same expression and so
toggled such a class the wrong way.
Replace one occurrence at a time, re-scanning from the start, in a helper
shared by both call sites. Whitespace between the remaining classes is
untouched.
2026-09-06 00:44:19 +02:00
Martin Angers
b4440419d8
make AttrOr return default value if selection is empty
2015-06-05 22:16:32 -04:00
Piotr Kowalczuk
c416dcdfae
Selection.AttrOr test
2015-04-17 00:38:27 +02:00
Jaime Pillora
51379dc225
SetAttr now creates attributes, in addition to updating attributes, closes #57
2014-12-06 18:53:56 +11:00
Martin Angers
c0464bb4c9
fix class manipulation issue
2014-11-07 11:22:08 -05:00
Andrew Stone
9b29a63ff5
property: Add Set/Remove Attr functions
2014-10-29 11:11:06 -04:00
Andrew Stone
25807d1884
property: Add/Remove/Toggle Class functions
2014-10-29 11:11:01 -04:00
Martin Angers
a3fdc62e31
add test with Html() for good measure
2014-04-25 15:31:01 -04:00
Martin Angers
cf82003f7e
add test to detect a from a call to Text()
2014-04-25 15:28:38 -04:00
Martin Angers
6669ef001f
remove Document.Root, Document is itself a Selection (using embedded struct)
2012-10-14 12:28:27 -04:00
Martin Angers
eea8ab69ed
add PrevUntilSelection() and PrevUntilNodes() with tests
2012-09-06 10:57:54 -04:00
Martin Angers
454e21b28a
finalize End() tests
2012-09-05 10:06:52 -04:00
Martin Angers
6e1e76af6b
refactor Document to make Root a Selection, with all API available
2012-09-02 14:45:50 -04:00
Martin Angers
766e10867e
add Html() and tests
2012-09-01 21:08:39 -04:00
Martin Angers
6b36d629f0
add Text() with tests.
2012-09-01 10:45:47 -04:00
Martin Angers
d17b003dc8
fix tests after reorganization
2012-08-30 17:38:51 -04:00
Martin Angers
de74d0bf97
reorganize code in what seems like a sane structure
2012-08-30 17:35:41 -04:00