Skip to content

Commit d26a5e2

Browse files
committed
fixed formats
1 parent d9af7b4 commit d26a5e2

72 files changed

Lines changed: 2449 additions & 1619 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/404.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="utf-8">
55
<meta name="viewport" content="width=device-width,initial-scale=1">
66
<title>Page Not Found :: Electrónica, Robótica e IOT con Elixir</title>
7-
<meta name="generator" content="Antora 3.1.14">
7+
<meta name="generator" content="Antora 3.1.10">
88
<link rel="stylesheet" href="/elixir-robotics/_/css/site.css">
99
<link rel="stylesheet" href="/elixir-robotics/_/js/vendor/styles/monokai.css">
1010
</head>

docs/_/js/search-ui.js

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,14 @@
133133
document.head.appendChild(link);
134134
}
135135

136+
function highlightPageTitle (title, terms) {
137+
const positions = getTermPosition(title, terms);
138+
return buildHighlightedText(title, positions, snippetLength)
139+
}
140+
136141
function highlightSectionTitle (sectionTitle, terms) {
137142
if (sectionTitle) {
138-
const text = sectionTitle.title ?? sectionTitle.text;
143+
const text = sectionTitle.text;
139144
const positions = getTermPosition(text, terms);
140145
return buildHighlightedText(text, positions, snippetLength)
141146
}
@@ -151,7 +156,8 @@
151156
return []
152157
}
153158

154-
function highlightText (text, terms) {
159+
function highlightText (doc, terms) {
160+
const text = doc.text;
155161
const positions = getTermPosition(text, terms);
156162
return buildHighlightedText(text, positions, snippetLength)
157163
}
@@ -177,12 +183,9 @@
177183
}
178184
}
179185
return {
180-
pageTitleNodes: highlightText(doc.title, terms.title || []),
186+
pageTitleNodes: highlightPageTitle(doc.title, terms.title || []),
181187
sectionTitleNodes: highlightSectionTitle(sectionTitle, terms.title || []),
182-
pageContentNodes: highlightText(
183-
sectionTitle?.title && sectionTitle.text ? sectionTitle.text : doc.text,
184-
terms.text || []
185-
),
188+
pageContentNodes: highlightText(doc, terms.text || []),
186189
pageKeywordNodes: highlightKeyword(doc, terms.keyword || []),
187190
}
188191
}
@@ -196,12 +199,12 @@
196199
let sectionTitle;
197200
if (ids.length > 1) {
198201
const titleId = ids[1];
199-
sectionTitle = doc.titles.find(function (item) {
202+
sectionTitle = doc.titles.filter(function (item) {
200203
return String(item.id) === titleId
201-
});
204+
})[0];
202205
}
203206
const metadata = item.matchData.metadata;
204-
const highlightingResult = highlightHit(metadata, sectionTitle || doc, doc);
207+
const highlightingResult = highlightHit(metadata, sectionTitle, doc);
205208
const componentVersion = store.componentVersions[`${doc.component}/${doc.version}`];
206209
if (componentVersion !== undefined && currentComponent !== componentVersion) {
207210
const searchResultComponentHeader = document.createElement('div');
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)