Skip to content

Commit

Permalink
Merge branch 'mepanymarqueesection' of https://github.com/adobecom/milo
Browse files Browse the repository at this point in the history
… into mepanymarqueesection
  • Loading branch information
vgoodric committed Sep 17, 2024
2 parents e25168a + 4b1f438 commit 9f8b20d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion libs/features/personalization/personalization.js
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ function modifySelectorTerm(termParam) {
const startText = startTextMatch ? startTextMatch[0].toLowerCase() : '';
const startTextPart1 = startText.split(/\.|:/)[0];
const endNumberMatch = term.match(/[0-9]*$/);
const endNumber = endNumberMatch ? endNumberMatch[0] : '';
const endNumber = endNumberMatch && startText.match(/^[a-zA-Z]/) ? endNumberMatch[0] : '';
if (!startText || htmlEls.includes(startText)) return term;
if (otherSelectors.includes(startText)) {
term = term.replace(startText, '> div');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"data": [
{
"action": "removeContent",
"selector": ".custom-block1",
"selector": ".custom-block-1",
"page filter (optional)": "",
"param-newoffer=123": "",
"all": "on"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ const values = [
},
{
b: 'section1 .random-block2',
a: 'main > div:nth-child(1) .random-block:nth-child(2 of .random-block)',
a: 'main > div:nth-child(1) .random-block2',
},
{
b: 'main > section30',
Expand Down Expand Up @@ -147,6 +147,10 @@ const values = [
b: 'any-marquee-section',
a: 'main > div:has([class*="marquee"])',
},
{
b: '.aside03',
a: '.aside03',
},
];
describe('test different values', () => {
values.forEach((value) => {
Expand Down

0 comments on commit 9f8b20d

Please sign in to comment.