-
Notifications
You must be signed in to change notification settings - Fork 11.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Search broken due to newline in news #2459
Comments
I believe I fixed this in #2450. Also there isn't a comment from you there. |
The following changes introduced in #2450 breaks search on my setup. al-folio/_includes/scripts/search.liquid Lines 90 to 94 in d004837
I used a markdown link like My suggestion would be to simple stay with the previous code. People can manually add Another (untested) solution could be to remove all HTML, using |
Okay, this error was a bit hard to reproduce. It was not the HTML Link, but a newline in my news. The Browser's Error console quickly displayed the error.
When I removed the second line of my news, search worked again. Additionally, I'm not very happy with the currenty mardown representation. For example, this news entry:
Produces: Update: On upstream/master, I get a rendered Link. I don't know why, but anyways, i think it should not be rendered. The link is not intended to be clicked, and it is also hard to read. I suggest to use al-folio/_includes/scripts/search.liquid Lines 90 to 97 in afc56cc
Also, I do not like the dependence on the What do you think? |
I agree that it is hard to read, but I am not sure if it should not be clicked. Think about this use case, what should happen if the user search for the news, and it is inline with a link? Should it only be read, or should be possible to click in it? But I don't think we should take the link and expand to the whole line either, because maybe the news has more than one link in it. I'd like to have more opinions on that matter. What do you think @pourmand1376, @alshedivat?
Idk, because if for some reason someone forgets to set |
In my humble opinion, the ideal behavior would be to visit the news page. If it is an inline news, all other inline news should become invisible through the use of CSS or JavaScript. Similarly, I imagine searching for BibTeX and papers.
Well, if someone forgets it, would that be a user error? We could also apply something like If |
Ok I will take a closer look at this. |
I use markdown links in inline news and also changed to these filters to not have HTML source being shown as search entries. |
Just tested your suggestion @CheariX, and it won't work. If the title is not defined, it is generated automatically from the filename apparently. For example, for the 1st news it generated I will add the |
Fixes #2459 Signed-off-by: George Araujo <george.gcac@gmail.com>
…#2561) Fixes alshedivat#2459 Signed-off-by: George Araujo <george.gcac@gmail.com>
…#2561) Fixes alshedivat#2459 Signed-off-by: George Araujo <george.gcac@gmail.com>
Have you checked that your issue isn't already filed?
Bug description
See my details in #2450
How to reproduce the bug
Add markdown link to an inline news article
Edit: Initially, I thought this issue is caused to due markdown. But I was wrong, it occurs if the content has more than one line.
Error messages and logs
No response
What operating system are you using?
Not applicable (e.g. you're using GitHub Pages or other hosting)
Where are you seeing the problem on?
Running locally with Docker
More info
I think my report in a closed PR was overlooked. Therefore I created this issue.
The text was updated successfully, but these errors were encountered: