27 Commits

Author SHA1 Message Date
Martin Angers
8a11cc402f Ignore non-element nodes when inserting html in a selection 2021-01-11 18:43:18 -05:00
Martin Angers
4a687a672f add test cases to check html insertion order 2020-10-08 09:02:13 -04:00
thiemok
94c2530dd8 fix(manipulation): fix node insertion and caching issues
Node caching was still using the node type instead of the node name in a
few places. Updated those to also use the node name as the cache key.

ReplaceWithHtml and PrependHtml inserted parsed nodes in the wrong
order. Kept track of the correct parent to fix this.

Use correct parent flag for SetHtml
2020-10-07 20:04:45 +02:00
Martin Angers
5d7b0271f0 add tests to confirm erroneous behaviour 2020-10-07 10:54:01 -04:00
thiemok
d89086ead1 fix(manipulation): address issues from code review of #235
* SetHml remains unchanged, see comment on the isParent param of
eachNodeHtml
* Removed unused functions
* Added documentation on eachNodeHtml
* Fixed node parsing cache keys and added test
* Refactored some tests for clarity
2020-09-28 15:37:51 +02:00
David Wilkins
99c8f1ecd5 Fixes #178 - Send context to parseHtml 2020-09-25 18:45:19 +02:00
Martin Angers
844d6bd46b doc: clarify how RemoveFiltered works 2020-02-24 18:34:32 -05:00
Martin Angers
c56812c109 fix godoc comment to comply with golint 2018-01-11 08:48:49 -05:00
Martin Angers
46c32cef0e unexport SetNodes, add SetHtml tests 2017-02-12 11:34:10 -05:00
Gleb Tv
755fd592bb implement SetHtml and SetText, fixes #123 2017-02-08 16:27:36 +03:00
Martin Angers
2ab590df05 use a failing matcher if selector fails to compile, adjust tests 2016-06-15 09:27:17 -04:00
HARUYAMA Seigo
d9b2b5ed51 cascadia has moved.
code.google.com/p/cascadia
->
github.com/andybalholm/cascadia
2015-03-28 11:15:11 +09:00
Andrew Stone
edcb3e4b1e manipulation: Add Prepend*()
Looks like I missed yet another manipulation function.
2015-02-04 11:28:51 -05:00
Martin Angers
a923db6a4b review PR, fix WrapInner bug 2014-11-28 11:46:58 -05:00
Andrew Stone
2455631714 manipulation: Add Unwrap() 2014-11-12 10:37:11 -05:00
Andrew Stone
162ad3a767 manipulation: add ReplaceWith*() functions 2014-11-12 10:37:11 -05:00
Andrew Stone
ca48f5f409 manipulation: add Wrap*() functions 2014-11-12 10:37:11 -05:00
Martin Angers
39d99e8fa4 remove fmt dependency 2014-11-07 13:21:28 -05:00
Martin Angers
c0464bb4c9 fix class manipulation issue 2014-11-07 11:22:08 -05:00
Martin Angers
3aedb35ed4 remove lint warning 2014-11-07 09:21:01 -05:00
Martin Angers
409e94058f make test assert helpers private 2014-11-07 09:20:20 -05:00
Martin Angers
251095afb5 start adding matcher functions 2014-11-06 21:43:08 -05:00
Andrew Stone
2abc410148 manipulation: Add Before*() functions. 2014-10-24 11:49:20 -04:00
Andrew Stone
2bd0871a77 manipulation: Add After*() functions. 2014-10-24 11:49:20 -04:00
Andrew Stone
b7dabffd85 manipulation: Add Empty() function. 2014-10-24 11:49:05 -04:00
Andrew Stone
b800859dea manipulation: Add Remove*() functions. 2014-10-24 11:49:05 -04:00
Andrew Stone
0e970f1f85 manipulation: Add Append*() functions 2014-10-24 11:49:01 -04:00