joe-syntax
joe-syntax copied to clipboard
enhancements to markdown syntax
I know it's a joke, but still. :)
A number of ideas here:
- Bold + italics doesn't quite work. IF I do this, the last * is unbolded. (Um, I escaped that avoid Github's own markdown parsing -- I mean three *s in a row)
- Bold or colorize headers -- either lines immediately followed by a line with --- or === (any number), or lines that begin with #.
- But three or more -, *, or _ on a line which isn't a headline should be a horizontal rule. I think this might be nicely represented by inverse-color for the whole line.
- Color quoted text (lines start with >). Yellow, maybe.
- Properly color automatic links like http://example.org/ (maybe just all http:// occurrences, with or without angle brackets?)
That's not funny ... but I will consider it :)
Can you provide a sample file that features everything (nicely separated) that you mentioned because I'm not soo familiar with Markdown?
Thanks! See http://mattdm.org/random-data/markdown-sample.md -- which is rendered inline below.
italics bold _bold + italics_
italics bold _bold + italics_
italics + bold italics + bold
bold + italics bold + italics
Top-Level Header
Secondary Header
This is a secondary header too
Another Top-Level Header
Secondary Header
Third-level Header
Fourth-level Header
Fifth-level Header
Sixth-level Header
In some implementations, trailing hashes are allowed (and not rendered)
These are horizontal rules:
__
Although the underscore one does not work on GitHub. And note that one can use an arbitrary amount:
A gotcha is that this line is a header, because it's followed by dashes.
This line is followed by a horizontal rule, though.
This is a block quote. Blah blah blah blah blah. more blah blah blah blah blah
Oh! Lines which start with four spaces are code blocks, and should be monospaced.
That doesn't matter in Joe, obviously, but using color here seems appropriate.
(How about green?)
And finally, here are five different ways links can be constructed. Different variants of markdown might not handle bare links or just the brackets, but the others work everywhere.
- Bare link: http://mattdm.org/random-data/markdown-sample.md
- Angle brackets: http://mattdm.org/random-data/markdown-sample.md
- Inline Reference: This is the displayed text
- Numbered Reference: This is the displayed text
- Arbitrary Reference This is the displayed text
The more complicated syntax also allows an optional title. Either: Link text or Link text
And these are the definitions for the reference links. The whole line should probably be colored
I actually think this will be practically useful, and not just silly, because without any way to wysiwyg preview in Joe, this at least gives a little bit of the feel of it.
What a complete example, thank you - I'll try to do my best...
Awesome -- thanks! On another note, have you tried at all to get all of these enhancements upstream?
http://commonmark.org/ is also a good resource.