First time here? Check out the FAQ!
0

Email subscription in plain text with markdown

I view my emails in plain text. For example, emails from stackexchange look fine both in html and in plain text. When in plain text, they are formatted in Markdown - [name] (url) for links, * text * for bold/emphasis.
In contrast, the emails from Ask Fedora viewed in plain text do not show the links in any way. Before I switched to HTML mode to troubleshoot this, I did not even know that there were links in the email.

updated 2014-10-14 17:09:10 -0500
This post is a wiki. Anyone with karma >100 is welcome to improve it.
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

0

discussed this a bit at: ask.fedoraproject.org/en/question/55354/email-subscription-in-plain-text/


I checked the RSS feed, and it looks like legit markdown. so maybe it's just the emails.

  • celery task [send_instant_notifications_about_activity_in_post](https:// github.com/ASKBOT/askbot-devel/blob/master/askbot/tasks.py#L213-L283) send the email and calls
  • [askbot.models.format_instant_notification_email](https:// github.com/ASKBOT/askbot-devel/blob/master/askbot/models/__init__.py#L3198) which in turn calls
  • [askbot.mail.send_mail](https:// github.com/ASKBOT/askbot-devel/blob/master/askbot/mail/__init__.py#L108-L116) which in turn calls
  • [askbot.utils.html.get_text_from_html](https:// github.com/ASKBOT/askbot-devel/blob/master/askbot/utils/html.py#L148-L175) which
  • uses BeautifulSoup to transform the html into text; that's the part that strips html tags and that you would want to edit if you wanted to give the markdown syntax instead.

If you were going that route I would suggest to have footer notes e.g.

This is some email content with [some text][1].
Please check [your answer][2] or visit [your profile][3].

Links:
[1]: http://...
[2]: https://...
[3]: https://...

... rather than inline links.

dnozay's avatar
1
dnozay
answered 2014-10-15 19:10:17 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments