myyasuda / sphinx_materialdesign_theme

Material Design Html Theme for Sphinx.
https://myyasuda.github.io/sphinx_materialdesign_theme/
MIT License
69 stars 38 forks source link

Fixing Issue #9 #11

Open bman7777 opened 5 years ago

bman7777 commented 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; },

jensens commented 4 years ago

I can confirm this fixes the problem.

maicodelphi commented 4 years ago

@myyasuda could you merge this please?