Skip to content
This repository was archived by the owner on Apr 8, 2025. It is now read-only.

Change "_source" to "source" #44

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions sphinx_search/static/js/rtd_sphinx_search.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ const get_section_html = (sectionData, page_link) => {
</a> \
<br class="br-for-hits">';

let section_subheading = sectionData._source.title;
let section_subheading = sectionData.source.title;
let highlight = sectionData.highlight;
if (getHighlightListData(highlight, "sections.title")) {
section_subheading = getHighlightListData(
Expand All @@ -188,7 +188,7 @@ const get_section_html = (sectionData, page_link) => {
}

let section_content = [
sectionData._source.content.substring(0, MAX_SUBSTRING_LIMIT) + " ..."
sectionData.source.content.substring(0, MAX_SUBSTRING_LIMIT) + " ..."
];

if (getHighlightListData(highlight, "sections.content")) {
Expand All @@ -206,7 +206,7 @@ const get_section_html = (sectionData, page_link) => {
}
}

let section_link = `${page_link}#${sectionData._source.id}`;
let section_link = `${page_link}#${sectionData.source.id}`;

let section_id = "hit__" + COUNT;

Expand Down Expand Up @@ -258,11 +258,11 @@ const get_domain_html = (domainData, page_link) => {
</a> \
<br class="br-for-hits">';

let domain_link = `${page_link}#${domainData._source.anchor}`;
let domain_role_name = domainData._source.role_name;
let domain_name = domainData._source.name;
let domain_link = `${page_link}#${domainData.source.anchor}`;
let domain_role_name = domainData.source.role_name;
let domain_name = domainData.source.name;
let domain_docstrings =
domainData._source.docstrings.substr(0, MAX_SUBSTRING_LIMIT) + " ...";
domainData.source.docstrings.substr(0, MAX_SUBSTRING_LIMIT) + " ...";

// take values from highlighted fields (if present)
if (domainData.highlight !== undefined && domainData.highlight !== null) {
Expand Down
Loading