-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
fix: search does not find the contents of the table #1198
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/docsify-core/docsify-preview/qfd7yuok4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR.
Is now okay? @anikethsaha |
remove the scope, Also, change the commit message as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good Job. 👍
Litte suggestion.
I think this block could refine.
if (!token.text && token.type === 'table') {
token.text = token.cells
.map(function(rows) {
return rows.join(' | ');
})
.join(' |\n ');
}
index[slug].body += '\n' + (token.text || '');
} else {
if (!token.text && token.type === 'table') {
token.text = token.cells
.map(function(rows) {
return rows.join(' | ');
})
.join(' |\n ');
}
index[slug].body = index[slug].body
? index[slug].body + token.text
: token.text;
}
what the the difference is solving the index[slug].body
.
it seems too much duplicate here.
if (!token.text && token.type === 'table') {
token.text = token.cells
.map(function(rows) {
return rows.join(' | ');
})
.join(' |\n ');
}
and I prefer to use |
nah, it's okay. |
is there any issue which is being fixed by this PR ? feel free to close that one |
No relevant issue. I found the problem, fixed it by the way. |
great |
Summary
The previous commit #1015 only fixed the situation where there was no content before the table. like this:
But this one below is not searchable.
What kind of change does this PR introduce? (check at least one)
If changing the UI of default theme, please provide the before/after screenshot:
Does this PR introduce a breaking change? (check one)
If yes, please describe the impact and migration path for existing applications:
The PR fulfills these requirements:
fix #xxx[,#xxx]
, where "xxx" is the issue number)You have tested in the following browsers: (Providing a detailed version will be better.)
If adding a new feature, the PR's description includes:
To avoid wasting your time, it's best to open a feature request issue first and wait for approval before working on it.
Other information:
lib
directory.