<p>I ran into this problem when I was writing a rather long reply to another mapper's message. I have drafted my message with <a href="https://daringfireball.net/projects/markdown/" rel="nofollow">original Markdown</a>; but when I previewed the message before sending, I found several problems with <a href="https://www.openstreetmap.org/" rel="nofollow">OpenStreetMap.org</a>'s Markdown implementation around its interpretation of nested numbered/bullet list.</p>
<p>This resulted in me having fumble for several minutes to find <em>partial</em> workaround (see below), before I could actually send the message in a relatively unmangled form.</p>
<p>Exact steps to reproduce:</p>
<ul>
<li>Start a browser with a new private browsing session (or with cookies cleared) and JavaScript enabled.</li>
<li>Visit your own OSM user page as anonymous user.</li>
<li>Click <em>Send Message</em>.</li>
<li>You will be prompted to log in: enter your OSM user and password.</li>
<li><q>Send a new message</q> page will appear.</li>
<li>Enter <code>These are nested lists...</code> in the <em>Subject</em> field.</li>
<li><strong>Copy</strong> text from <a href="https://gist.githubusercontent.com/nachanon/320b8a0473ac0658a8f2fe8ddd9da6c7/raw/8c94d376792af491c71795a2f225e5212ed046eb/nestedlist.md" rel="nofollow">this Gist</a> <strong>and paste</strong> it into the <em>Body</em> field. (Warning: Tab indentation on blank lines are totally intended)</li>
<li>Click the <em>Preview</em> button.</li>
</ul>
<p>The preview would show something like this:<br>
<a target="_blank" rel="noopener noreferrer" href="https://camo.githubusercontent.com/f7fb3f4d60c7adc7e6ec97b5d9f82342b8759afb/687474703a2f2f752e6375626575706c6f61642e636f6d2f7877696e646f77732f5a4d6f6761342e706e67"><img src="https://camo.githubusercontent.com/f7fb3f4d60c7adc7e6ec97b5d9f82342b8759afb/687474703a2f2f752e6375626575706c6f61642e636f6d2f7877696e646f77732f5a4d6f6761342e706e67" alt="" data-canonical-src="http://u.cubeupload.com/xwindows/ZMoga4.png" style="max-width:100%;"></a></p>
<p>Then, compare it to an output from <a href="https://daringfireball.net/projects/markdown/" rel="nofollow">the original Markdown</a>:<br>
<a target="_blank" rel="noopener noreferrer" href="https://camo.githubusercontent.com/58375f475c1f4eaaa53a00b080250a55ecb76504/687474703a2f2f752e6375626575706c6f61642e636f6d2f7877696e646f77732f307166334f4c2e706e67"><img src="https://camo.githubusercontent.com/58375f475c1f4eaaa53a00b080250a55ecb76504/687474703a2f2f752e6375626575706c6f61642e636f6d2f7877696e646f77732f307166334f4c2e706e67" alt="" data-canonical-src="http://u.cubeupload.com/xwindows/0qf3OL.png" style="max-width:100%;"></a></p>
<p>You would see that on OSM messaging interface...</p>
<ul>
<li><em>Bullet</em> lists that are nested inside numbered list <strong>are mistakenly displayed as <em>numbered</em> lists</strong>. <strong>(No workaround)</strong></li>
<li>Sub lists with <em>equally-indented</em> blank lines before and after them <strong>are mistakenly displayed as code snippet <em>and</em> excluded from the list</strong>. (Workaround: remove these lines before sending the message)</li>
</ul>
<p>Please investigate and fix.</p>
<p>Browser: Opera 11.64 (Win32)<br>
System: Microsoft Windows XP Professional SP3</p>
<h3>Notes</h3>
<ul>
<li>This is not specific to preview: the same message sent to myself also exhibit the same problem when viewed in the on-site inbox.</li>
<li>This is not specific to browser: result obtained from Pale Moon 25.8.1 (GNU/Linux 32-bit) is the same.</li>
<li>The word <em>Markdown</em> on the messaging page's help panel actually links to <a href="https://daringfireball.net/projects/markdown/" rel="nofollow">the original Markdown</a>. So, compatibility is expected.</li>
</ul>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/issues/2103">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABWnLbX82WmwU33RU-cI9LLi7Fq3IaZtks5vBaDZgaJpZM4Z283O">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABWnLWrJ65ddVMiVqcRRaz4klner1gdyks5vBaDZgaJpZM4Z283O.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/openstreetmap/openstreetmap-website","title":"openstreetmap/openstreetmap-website","subtitle":"GitHub repository","main_image_url":"https://github.githubassets.com/images/email/message_cards/header.png","avatar_image_url":"https://github.githubassets.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/openstreetmap/openstreetmap-website"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"Nested lists are incorrectly displayed in user messaging interface (#2103)"}],"action":{"name":"View Issue","url":"https://github.com/openstreetmap/openstreetmap-website/issues/2103"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/issues/2103",
"url": "https://github.com/openstreetmap/openstreetmap-website/issues/2103",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>