Skip to content
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

fix a FIXME in rss2html.ml while printing author name in blog feed #1551

Open
shreyaswikriti opened this issue Apr 21, 2021 · 3 comments
Open

Comments

@shreyaswikriti
Copy link
Contributor

I came across a FIXME in rss2html.ml page. that asks to check for word boundaries while printing author-name. I would like to fix this issue if approved.

@gs0510
Copy link

gs0510 commented Apr 22, 2021

@shreyaswikriti Were you able to figure out what the Fixme implies? @pitag-ha and I looked at it but couldn't decipher what the FIXME meant :)

@shreyaswikriti
Copy link
Contributor Author

@gs0510, what I understand from the functions
&& not(Utils.KMP.is_substring ~pat:a.name feed_author)
&& not(Utils.KMP.is_substring ~pat:feed_author a.name)
is:
this line is searching that a.name should not be present in feed_author and vice versa.
using is_substring function, it returns true even if the substring is present in between the string. Setting word boundaries returns true only if the substring is present as a whole word. Here is the explanation:
Suppose feed_author='swikriti'
a.name='shreyaswikriti'
not(Utils.KMP.is_substring ~pat:feed_author a.name) -->not(true)-->false
But there can be a possibility that this can be the name of two different persons. Giving false results won't generate a new feed_author.
Now checking using word boundary :
it results that 'swikriti' has no word boundary in 'shreyaswikriti' because 'shreyaswikriti' doesn't start with the word 'swikriti'
this gives the result that a new feed_author can be formed with the name 'swikriti'.

@gs0510
Copy link

gs0510 commented Apr 26, 2021

That makes sense @shreyaswikriti! You can go ahead and fix this :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants