Open bman7777 opened 5 years ago
Resolving issue: https://github.com/myyasuda/sphinx_materialdesign_theme/issues/9
The solution was adding role="main" so that when the results are found, this code can run properly:
htmlToText : function(htmlString) { var htmlElement = document.createElement('span'); htmlElement.innerHTML = htmlString; $(htmlElement).find('.headerlink').remove(); docContent = $(htmlElement).find('[role=main]')[0]; return docContent.textContent || docContent.innerText; },
I can confirm this fixes the problem.
@myyasuda could you merge this please?
Resolving issue: https://github.com/myyasuda/sphinx_materialdesign_theme/issues/9
The solution was adding role="main" so that when the results are found, this code can run properly:
htmlToText : function(htmlString) { var htmlElement = document.createElement('span'); htmlElement.innerHTML = htmlString; $(htmlElement).find('.headerlink').remove(); docContent = $(htmlElement).find('[role=main]')[0]; return docContent.textContent || docContent.innerText; },