-
-
-
A lot of the bullet list styles are there to just keep the resulting list as close as possible to the source text, to prevent jumps when going back and forth between editing/viewing. Probably not so important for e-mails. I imagine you could just nuke all the ol/ul/li rules pretty safely. That said, I don't care either way.
The "ch" unit is pretty new in terms of browser standards. Chrome 25+, IE9+, and Firefox 19+. New enough for the browsers we care about, but really wondering how many e-mail clients recognize that. That worked in your tests fine?
-
Slightly more efficient as:
el.set('style', ''.join([ '%s: %s;' % (k, v) for k, v in style.iteritems() ]))
Render markdown fields for HTML emails.
Review Request #4844 — Created Oct. 24, 2013 and submitted
Render markdown fields for HTML emails.
This change adds some slightly questionable code to render markdown to HTML for
the HTML emails. Annoyingly, python markdown doesn't interpret the input quite
the same as marked.js, so some things don't render the same (this is mostly
edge cases, particularly with the treatment of things like whether lists
require a blank line before them or not).This includes a simple extension for python-markdown that will go through the
resulting element tree and add inline styles. These styles are similar to what
we get from reviews.less, but somewhat simplified.
Viewed the html email previews for review requests, reviews, and replies with
markdown in the review request fields, review body_top/bottom, and comments.
Saw all of the fields rendered to markdown, instead of seeing all the control
and escape characters.
-
Might also be good to have a comment in the .less file for this saying to update this file when the rules change.