adobe / aio-theme

The Adobe I/O theme for building markdown powered sites
Apache License 2.0
71 stars 45 forks source link

fix: link text not indexing #1609

Closed dmitrymatio closed 3 months ago

dmitrymatio commented 3 months ago

Description

Main fix of link text missing from search results by correctly mapping to the queried link's text value with

if (child.type === 'link') {
     return child?.children?.find(child => child.type === 'text')?.value;
}

Some minor formatting fixes.

Related Issue

Motivation and Context

How Has This Been Tested?

Tested within commerce-php repo where the issue was originally reported from by @dshevtsov

Screenshots (if appropriate):

Types of changes

Checklist: