Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Markdown -> HTML issues (list levels and theming)

#1926

Hi Benny, I can't really catch up with MailMate's improvements, trying them out, but here's one I was wondering now for quite a while.

The documentation, or what I find using Google, doesn't really help me how outgoing mails are formatted and rendered in the preview pane. I understand that you use (or used?) sundown to convert Markdown to HTML - but how to control it (and e.g. add more layers for bullet points - which is what I'd like most to e.g. structure meeting notes in a mindmap-like fashion [besides some smaller headings]) is still a mystery to me.

I actually thought maybe it's the sundown utility that needs to be extended as it's not seen any updates since many years. Or is there maybe something else where I could get some control over my formatting and this bullet point thingy?

Ah, an example would be of course good, so here's one (watch especially out for 'Level 3'):

--=_MailMate_04CAD145-5B58-42FC-B135-ED0AC9A181FA_=
Content-Type: text/plain; markup=markdown

Hi

# Header 1

## Header 2
* Level 1
  * Level 2
    * Level 3
* Level 1 again

Text



--=_MailMate_04CAD145-5B58-42FC-B135-ED0AC9A181FA_=
Content-Type: text/html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8">
</head>
<body>
<div style="font-family:sans-serif"><div style="white-space:normal">
<p dir="auto">Hi</p>

<h1 style="font-size:1.4em">Header 1</h1>

<h2 style="font-size:1.2em">Header 2</h2>

<ul>
<li>Level 1

<ul>
<li>Level 2</li>
<li>Level 3</li>
</ul></li>
<li>Level 1 again</li>
</ul>

<p dir="auto">Text</p>
</div>
</div>
</body>
</html>

--=_MailMate_04CAD145-5B58-42FC-B135-ED0AC9A181FA_=--

Is there some CSS e.g. applied from somewhere for outgoing mails, or is there something only used for rendering in the preview pane?

Thanks,
-Stefan

Reported by Stefan Doehla · January 17th, 2018 @ 10:14 PM

State: new
Milestone: none
Assigned to: benny benny

Activity

  1. Stefan Doehla
    Stefan Doehla

    Hm, I played around with sundown a bit further and noted that it seems to work if one has at least five spaces for level 3 and nine for level four (!?)

    Is that you who I'd need to talk to to fix this - or is this Markdown-inherent - or is somewhen else who could address it?

    Example:

    * Level 1 needs no leading spaces
     * Level 2 needs one leading space
         * Level 3 needs five leading spaces
             * Level 4 needs nine leading spaces
    * Level 1 again
    
    • Level 1 needs no leading spaces
      • Level 2 needs one leading space
        • Level 3 needs five leading spaces
          • Level 4 needs nine leading spaces
    • Level 1 again

    And now with fewer spaces

    * Level 1 needs no leading spaces
     * Level 2 needs one leading space
        * Level 3 now with four spaces only
            * Level 4 is at level three now (maybe because of the previous level not being indented)
    * Level 1 again
    
    • Level 1 needs no leading spaces
      • Level 2 needs one leading space
      • Level 3 now with four spaces only
        • Level 4 is at level three now (maybe because of the previous level not being indented)
    • Level 1 again

    January 17th, 2018 @ 10:30 PM

  2. benny
    benny
    • State changed from new to closed

    I'm actually not sure what's going on here, but it'll be a waste of time to look into sundown. I have on my list to switch to CommonMark (while possibly also opening up to using alternatives). I'll close the ticket, but if it's still an issue when I've made the switch then we can re-open it.

    January 18th, 2018 @ 10:04 AM

  3. Anthony Craig
    Anthony Craig

    Have you implemented CommonMark yet? (Will CommonMark ever be finished? haha)

    March 6th, 2018 @ 10:48 PM

  4. benny
    benny

    @Anthony: CommonMark is not a feature yet, but it's still my plan to make it the default tool to convert from plain text to Markdown.

    March 9th, 2018 @ 11:02 AM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.