Dev - I fixed Utopian signaturesteemCreated with Sketch.

in #utopian-io7 years ago (edited)

image.png

As @espoem pointed out here, there is an issue with the signature that Utopian.io is adding to our posts, so I thought I'd go ahead and propose a fix!

Long story short, @espoem figured that when the signature ends with an ordered list, the signature is seen by markdown like being part of the list. Hence, it is shifted to the right and too close to the last line of text, making it look quite messy. After testing around, I realized that it is also the case for unordered lists (bullet points).

image.png

I first tried to add new lines before the signature but it just included all the lines within the list.
So, I investigated a bit and it seems like it is a known issue with Markdown, it's really protective from its lists and don't want to end them . I just inspected the HTML to confirm what I thought:

image.png

The signature was nested into the last bullet point. Therefore I made sure the lists are closed using HTML.

image.png

I made sure the current point 'li', unordered lists 'ul' and ordered lists 'ol' are all closed before the signature. Does not do anything if there is no list. I know it's probably not the sexiest way to do it, but it's a small issue and well, that works. EDIT: A cleaner way would be using \n\n in the js code, will test tomorrow.
Here is the result:

image.png
You can find my Pull Request here.

Hope this helps, every little detail counts on making an awesome project even better ;)

@stoodkev


Open Source Contribution posted via Utopian.io

Sort:  

Thank you for the contribution. It has been approved.

You can contact us on Discord.
[utopian-moderator]

Great Idea.I think it will be very helpful

Hey @stoodkev I am @utopian-io. I have just super-voted you at 44% Power!

Suggestions https://utopian.io/rules

-Your contribution is less informative than others in this category.

Achievements

-I am a bot...I love developers... <3
-Votes on this contribution are going well. Nice!
-Seems like you contribute quite often. AMAZING!
-You have a good amount of votes on your contributions. Good job!
Up-vote this comment to grow my power and help Open Source contributions like this one.

Congratulations @stoodkev! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

Award for the total payout received

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

By upvoting this notification, you can help all Steemit users. Learn how here!

buena información espero tu apoyo para aumentar mi crecimiento en steemit saludossteem-go-to-the-moon.gif

Coin Marketplace

STEEM 0.17
TRX 0.16
JST 0.028
BTC 73607.44
ETH 2612.93
USDT 1.00
SBD 2.41