You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When headers have special formatting, the search results do not have the correct # anchor links.
Example: ### The `[profile.*]` sections
has an anchor hash of #the-profile-sections but the search index uses a hash of #the--profile--sections (notice the extra dashes).
It also does not handle duplicate header names.
I looked at it briefly. The issue is that the anchor id is generated from the HTML content (here), and has special logic for striping out certain tags such as <code>. However, the search code re-parses the content, and replaces all tags with a single space (here).
I'm not sure what the best solution is. Some options I can think of:
Don't insert a space in the header for Events. I'm not sure which scenarios that would cause problems, but the common inline tags (code, strong, em) are normally surrounded by spaces already.
Check for Events that match the same list in id_from_content() and not insert a space in header in those situations.
Collapse duplicate whitespace in normalize_id into a single whitespace.
The text was updated successfully, but these errors were encountered:
Note: The example listed above was fixed some time before 0.3.0. I think it was due to a change in pulldown_cmark which trimed whitespace from the text strings. However, the way the IDs are generated are still different codepaths with subtle differences. The biggest remaining issue is that duplicate IDs are not handled.
When headers have special formatting, the search results do not have the correct # anchor links.
Example:
### The `[profile.*]` sections
has an anchor hash of
#the-profile-sections
but the search index uses a hash of#the--profile--sections
(notice the extra dashes).It also does not handle duplicate header names.
I looked at it briefly. The issue is that the anchor id is generated from the HTML content (here), and has special logic for striping out certain tags such as
<code>
. However, the search code re-parses the content, and replaces all tags with a single space (here).I'm not sure what the best solution is. Some options I can think of:
Event
s. I'm not sure which scenarios that would cause problems, but the common inline tags (code, strong, em) are normally surrounded by spaces already.Event
s that match the same list inid_from_content()
and not insert a space inheader
in those situations.normalize_id
into a single whitespace.The text was updated successfully, but these errors were encountered: