I can't decide if this is a great idea, or a terrible one…
Here's the problem it solves:
Markdown is supposed to look good both as plain text and when parsed to HTML. This *mostly* works for things like emphasis, but it doesn't work well for links.
So, here's the idea: a markup language that defines link text as anything between a zero width space and a `(` and the URL as everything before the `)`
So I could write:
> I wrote a blog post (https://www.codesections.com/blog/) about gtypist
(You can't see it, but I promise that there *really is* a zero width space before "blog post" in ^^^^)
@codesections At that point we may as well define new Unicode characters for markup. Or redefine HTML in terms of invisible characters.
> At that point we may as well define new Unicode characters for markup. Or redefine HTML in terms of invisible characters.
Fair enough. On the other hand, the "we" involved is pretty different. I don't know about you, but *I* can't get a whole range of new Unicode characters accepted.
On the other hand, I *could* write something that preprocesses my Markdown to let me use zero width spaces, so ¯\_(ツ)_/¯
@codesections the main issue afaict is that it's hard to type a zero-width space. That's the great thing about the brackets -- they're easy to type, plus a reader of the markdown source immediately knows the "button" of the link, or what text will be part of the link. I can't tell where your link starts in your example -- it could be between literally any two characters before the parenthese.
Yep, those are the reasons it might be a horrible idea :D
On the other hand
> reader of the markdown source immediately knows the "button" of the link
If you're a reader of it as plain text, it doesn't help you to know where the button is. If you're an *editor*, you need to know, but then you're probably using a text editor that displays zero width spaces (mine shows it as kind of a long, thin underscore)
@codesections fair enough, but since markdown is an authoring format a reader is probably also a writer or editor. So they'd still need to see the button.
And Im gonna be honest I have no idea how to see the zero width space. I think Vim only allows nbsp in :set list.
@codesections I would never want invisible control codes in my markup files. The typical way of
is pretty readable, but the footnote version
is nicer for print.
> I would never want invisible control codes in my markup files.
Yeah, that's what I'm torn on. If I'm writing/editing the document in an environment that displays the invisible characters, then I might not mind.
But maybe that's a slippery slope towards rich text, I don't know…
@codesections Sure, why not just insert printer control codes in your text, like we did back in the '70s? ;-)
> But @acdw has a point, how hard would it be to type? I don't think "ctrl+shift+u200A" is a good solution.
Yeah, that would depend heavily on authoring environment. Personally, it wouldn't be a problem – I could add it to the characters I can type using X11's `compose` key (which I'm already used to using for …, —, and similar). Or I could create a key combination in Emacs.
But I used a lot of different editors/computers, it'd be much harder
editors can help with that too. BBcode editors have existed for a while and Tumblr for example lets you switch between HTML, Markdown, and WYSIWYG modes.
@grainloom @codesections The advantage here would be that it looks nicer to read, not that markdown is too hard.
And I find the concept of the zero width space particularly intuitive for this use. It's an invisible separator, put it where in your text you want to separate the link from the text. What is confusing is most of all that it isn't on the keyboard.
@codesections here's my thought : Markdown looking good as plain text is a joke and 100% of Markdown is consumed as HTML produced by one of the billion tools meant for that purpose.
While headed for html, my Markdown is convenient for me. I enjoy jotting down notes...mostly without thinking about the format...a double tap of the enter key for most between- note situations.
Then I "consume" my notes through the browser from local files compiled into a journal.
I don't expect links to be usable from the text of Markdown.
@codesections no no no, the whole point of source code is for it to be readable and editable by humans, and the whole point of zero-width spaces is to *not* be visible to humans
@bugaevc @codesections “When you do want to insert a <br /> break tag using Markdown, you end a line with two or more spaces, then type return.” – https://daringfireball.net/projects/markdown/syntax
@codesections sounds bad. Hard to type and prone to cause bugs/errors and will be hard to figure out why.
You could automatically format URIs as formatted links. Just add ftp:// or https:// or whatever.
@codesections Pandoc treats `<...>` as a link. Maybe that could be used elsewhere? The problem is that you have to write the full url including `https://` or whatever. But your proposal would require assuming something about that.
@codesections urls can contain parentheses (and they don't have to be balanced)
But balanced examples include links to wiki articles
Fosstodon is an English speaking Mastodon instance that is open to anyone who is interested in technology; particularly free & open source software.