5 ms·
Markdown is fickle and at times unpredictable, and should not be the default formatting method for user input, imo.
by forgotmypw17 6y ago
Markdown is fickle and at times unpredictable, and should not be the default formatting method for user input, imo.
- dt3ft 6y agoAgreed, but what else is there for simple formatting like headings, bold, underline, img? I had to go with markdown because I could not find anything else out there.
- krmbzds 6y agoI would recommend AsciiDoctor: https://asciidoctor.org/ https://asciidoctor.org/
- geraldbauer 6y agoAnother great alternative is Wikitext used by the Wikipedia (among many others) see https://www.wikipedia.org https://www.wikipedia.org or https://en.wikipedia.org/wiki/Help:Wikitext https://en.wikipedia.org/wiki/Help:Wikitext PS: Why not have the best of both worlds, that is, Markdown and Wikitext? Yes, you can; see Texti (Text with Formatting Instructions) - https://texti.github.io https://texti.github.io
- scrollaway 6y agoTexti is yours? It looks like an interesting experiment. Lots of good ideas in it, though it gets way too unfocused/wip in the second half of the document, especially in some areas like the "blocks". (Also your emojis are broken) Having hash line comments is probably a non-starter in a text format (the latex % syntax is probably a better idea indeed if you want line comments). Also the -- strikethrough -- syntax will probably conflict too much. You want comments to use a syntax which is otherwise nearly unused.
- geraldbauer 6y agoThanks for your kind words (yes, sorry for the missing disclaimer). Texti is slowly evolving :-) The point is NOT to invent new syntax [1], thus, using the established unix-style/shell-style/python-style/ruby-style for comments. For a litte real world examples that generated HTML, LaTeX and Markdown from Texti see https://github.com/texti/texti.github.io/tree/master/samples https://github.com/texti/texti.github.io/tree/master/samples PS: The main missing feature (among others) in Markdown and that rocks Wikitext (and Texti too) is built-in (recursive) templates (with optional parameters) using the {{}} syntax. [1]: I know % is not new because it's used in LaTeX but LaTeX is esoteric compared to Python, Ruby, Shell Scripts, Unix Configs, etc.
- scrollaway 6y agoYeah I figured, and I personally really like # for comments in code, but here's a list of reasons why I don't think hash as comment in text is workable, in practice: #1: That's the only reason.
- geraldbauer 6y agoFYI: # is already "reserved" in markdown for headings. So in theory markdown is also not workable, in practice :-). It's kind of like: 1. FC Köln - that's a football club name (and not a list marker). Try it in markdown - same gotcha :-)
- scrollaway 6y agoWell, that's true, you have a point there ;) It's probably my bias talking. Good luck with the project; I love Markdown, but it's great that other people are exploring alternatives.
- moonchild 6y agoWhy 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.
- KitDuncan 6y agoPlain HTML is super verbose for basic text formatting. Having to wrap every paragraph is super annoying UX.
- enriquto 6y agoHTML5 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.
- antman 6y agoIs that a spec or it just happens?
- Stratoscope 6y agohttps://html.spec.whatwg.org/ https://html.spec.whatwg.org/
- enriquto 6y agoPart 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 https://google.github.io/styleguide/htmlcssguide.html
- duckmysick 6y agoIt 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-tag-omission 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.
- rovr138 6y agoreStructuredText is another one, - https://en.wikipedia.org/wiki/ReStructuredText https://en.wikipedia.org/wiki/ReStructuredText - https://docutils.readthedocs.io/en/sphinx-docs/user/rst/quickstart.html https://docutils.readthedocs.io/en/sphinx-docs/user/rst/quic...
- scambier 6y agoMarkdown is at a sweet spot that combines ease of read and write for technical and non-technical users. It's primarily made to be written and shared as-is.
- tasogare 6y agoSweet spot as long as you don’t want anything basic like using colors. In my experience Markdown has been about as much painful and frustrating than helpful.
- shakna 6y agoColor isn't really that basic a thing - you need to take into account the medium that the color will be displayed in to do it correctly. However, as Markdown is supposed to be nothing more than a superset of HTML, you can simply reach for CSS. It won't always render the best if you're moving from Markdown to physical medium, but that's largely dependent on the engine.
- EE84M3i 6y agoI very rarely, if ever, encounter markdown inputs where markdown is a superset of HTML. Almost always script tags and various other sorts of active content are stripped at the very least.
- shakna 6y agoIf certain tags are being stripped, then you're probably in a position where arbitrary input isn't desirable. If this is an input to a website, for example, the webmaster really doesn't desire everyone to be able to reinvent the blink tag, or be able to express everything in rainbow fonts. In which case Markdown shines, for it's ability to express simple markup, that can be safely expressed.
- geraldbauer 6y agoYou can use colors - like in html and css you keep style and structure separate. If you want all your heading 2 blue, for example, than you can use h2 { color: blue; } and so on and so forth. PS: By the way, you are currently commenting in text without colors - how do you feel?
- tmpfs 6y agoCheck out commonmark for something less fickle than your average flavor. It adds a specification so users and developers know what to expect.
- aendruk 6y ago> unpredictable A short feedback loop (e.g. live preview) should take care of that.