synzen / MonitoRSS

MonitoRSS RSS bot (formerly known as Discord.RSS) with customizable feeds. https://monitorss.xyz
https://monitorss.xyz
MIT License
1.07k stars 238 forks source link

Redundant leading space in lists #327

Closed m417z closed 1 year ago

m417z commented 1 year ago

Describe the bug

First of all, thank you for the great project and service. I needed a simple update service for my Discord channel and MonitoRSS is just perfect for that.

A minor bug report: Lists have an extra leading space for each bullet but the first, which looks unaligned and wrong.

Source HTML:

<ul>
<li>Renamed from "Large Taskbar Icons" to "Taskbar height and icon size".</li>
<li>Fixed support for secondary taskbars.</li>
<!-- ... -->
</ul>

Result:

image

To Reproduce

Use an RSS feed with a list. My feed for reference: https://mods.windhawk.net/updates.atom

Expected behavior

Be consistent. Batter have no leading spaces at all in my opinion.

Screenshots

See above.

Branch (please specify one):

public bot

Additional context

I tried looking at the code, I found that node-html-to-text is used, and it has the following formetter option:

itemPrefix with default value ' * '

I believe that setting it to '* ' should fix the problem. I'm not familiar with the project so I'm not sure what's the best place for it, I saw multiple places that use node-html-to-text, but I believe that it should be an easy fix.

Edit: Even better, how about setting it to '• '? Looks much better in my opinion:

image

synzen commented 1 year ago

Apologies for the late reply. Since you're on the personal bot, is it reasonable for you to move over to personal feeds (accessible at https://my.monitorss.xyz)? I believe this should not be an issue there.

m417z commented 1 year ago

I tried configuring the personal feeds. That didn't work for me - the dialog for adding a new connection doesn't list all channels, specifically the announcement channels that I want the news to be posted on. Is it a known limitation?

synzen commented 1 year ago

I see - no, that was an oversight. Announcement channels should now be available

Note however that auto-publishing them is not currently supported, but a separate bot to auto-publish messages might be a solution.

m417z commented 1 year ago

Thanks, I could set it up now.

Some feedback:

But the above can be worked around and isn't very important.

Regarding the issue itself - the inconsistent leading spaces are fixed, see screenshot below. But still, I think that replacing ' * ' with '• ' would result in a cleaner output. What do you think?

image

synzen commented 1 year ago

Yes I think that would be good as well. Thanks for the feedback.

I believe this issue is resolved now, but you may let me know if you have any more concerns or suggestions

m417z commented 1 year ago

@synzen Recently, Discord added support for markdown lists, so you might want to revert that change. https://twitter.com/discord/status/1648377300776370205