feat(toc): seek anchor id from parent nodes when target is not available #3404
Signed-off-by: Richard Lea email@example.com
Thank you for creating a pull request to contribute to Hexo code! Before you open the request please review the following guidelines and tips to help it be more easily integrated:
@YoshinoriN Thanks for reviewing.
This change is mainly focusing on HTML like the case below:
<div id="data-summarise" class="section level2"> <h2>Data Summarise</h2> <p>...</p> </div>
, where the id is not assigned directly on the heading tag. However, this id anchor is still work for navigating to the target heading.
So something mocking the template like the case above could be testing case for this change.