News for hackers. Stuff that matters.
Re:Markdown Tutorial by moonchild on Monday May 18, 2020 @03:49AM (#23219515)
Why not plain html? For simple formatting like you mention, it really is simple, and it has all the power you could want if you want if you to go further.
Re:Markdown Tutorial by KitDuncan on Monday May 18, 2020 @04:03AM (#23219636)
Plain HTML is super verbose for basic text formatting. Having to wrap every paragraph is super annoying UX.
Re:Markdown Tutorial by enriquto on Monday May 18, 2020 @04:27AM (#23219811)
HTML5 is not all that verbose. You can omit closing tags for many elements (for example, </p>, </li> and </td>). Many other tags are also implicitly opened, like <body> and the like. I actually prefer it to markdown for most cases.
Re:Markdown Tutorial by antman on Monday May 18, 2020 @04:52AM (#23220014)
Is that a spec or it just happens?
Re:Markdown Tutorial by enriquto on Monday May 18, 2020 @05:56AM (#23220419)
Part of the spec, and recommender by many people.

For some examples of modern html, see google's style guide for html, section 3.1.7 shows an example of a complete and correct document that may blow your mind. Also, the examples of tables and lists without closing elements:

https://google.github.io/styleguide/htmlcssguide.html

Re:Markdown Tutorial by duckmysick on Monday May 18, 2020 @10:36AM (#23222822)
It sounds good in theory, but in practice it adds a huge mental overhead.

> A p element's end tag may be omitted if the p element is immediately followed by an address, article, aside, blockquote, details, div, dl, fieldset, figcaption, figure, footer, form, h1, h2, h3, h4, h5, h6, header, hgroup, hr, main, menu, nav, ol, p, pre, section, table, or ul element, or if there is no more content in the parent element and the parent element is an HTML element that is not an a, audio, del, ins, map, noscript, or video element, or an autonomous custom element.

https://html.spec.whatwg.org/multipage/syntax.html#syntax-ta...

This is so complicated. In the end it's easier for me to close the tag instead of second guessing if I may skip it or may not.

Re:Markdown Tutorial by enriquto on Tuesday May 19, 2020 @08:09AM (#23233934)
In practice you can always skip the closing p tag. The difference is inconsequential (it only matters for the whitespace).
Re:Markdown Tutorial by Stratoscope on Monday May 18, 2020 @05:01AM (#23220074)
Re:Markdown Tutorial by bachmeier on Monday May 18, 2020 @06:57AM (#23220822)
If I want to convert my work to PDF or MS Word format, that's easy to do if I've used markdown, due to the existence of converters. If the document is written in html, the conversion is more difficult. Any html extensions that need to be converted by hand stand out in a markdown document.