-
Notifications
You must be signed in to change notification settings - Fork 341
Adding spaces on paragraph endings for search results #1167
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
Conversation
So this should be enough to fix it, could not find any test for the search templates, can you point me where I can implement the tests for it? Or is the tests I added enough already in your opinion? |
I guess before when we generated the html from markdown, we would automatically add a newline between paragraphs. But now we don't. This fix looks good to me but maybe @wojtekmach prefers to fix it on the HTML generation side. Thoughts? |
I supposed the same, thought the change was probably intentional to make htmls smaller, that’s why I went with this solution. IMHO fixing it on HTML generation would make it brittle, as we might be getting the same problem with other tags that add spaces (like divs for example) that can be added by users on @doc manually. I don’t think my solution is the PERFECT one, as it would add spaces even for tags that don’t, I just don’t think it’s worth the hassle of searching for that perfect one.
Best,
Kelvin Stinghen
Kelvin.stinghen@me.com
…Sent from my iPhone
On 17 May 2020, at 05:08, José Valim ***@***.***> wrote:
I guess before when we generated the html from markdown, we would automatically add a newline between paragraphs. But now we don't. This fix looks good to me but maybe @wojtekmach prefers to fix it on the HTML generation side. Thoughts?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Yeah, I think it would be nicer to fix it on the html generation side, I'll briefly look that but it's likely we'll just end up with this patch. :) |
I will take a stab at fixing this on the HTML generation side. |
@wojtekmach this can't be fixed on the HTML generation side.
This is the value that the template is working with |
Well, that's odd, I didn't touch the actual tag regex, can you test the same with the old code? Maybe that's an old bug. |
@kelvinst i think its due to the way your logic for adding spaces works |
@davydog187 I pulled the branch and I'm not seeing the issue from your screenshot: Or maybe I'm missing it, what is the issue exactly? edit: To be clear, this PR seems to be working for me |
@michallepicki its been a while, so I'm not sure. |
Just revisiting this old PR, I have tested it and couldn't repeat @davydog187's problem either. But mine doesn't even show the link for |
💚 💙 💜 💛 ❤️ |
Fixes #1164