-
Notifications
You must be signed in to change notification settings - Fork 632
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add definition for plain text #1800
base: master
Are you sure you want to change the base?
Conversation
Looks good, but we really need to stop calling this "plain text". It doesn't make any sense. Adds:
Additional rules:
|
I thought about introducing the term "nostr flavored markdown" but I think that communicates the wrong thing. "Human writable text" is the closest name I can come up with to the actual justification for this, but it also makes no sense. Those are good additions, I've added most of them (although making the language somewhat less prescriptive). I left out geohashes since those aren't really human readable or writable. Topics were already in the list. |
"Human writable text" should not include any NIP-19 URIs IMO. Either way, it should be either all or nothing. Keeping very long unreadable, unwritable URIs like |
Humans copy/paste urls, they can copy/paste |
10.md
Outdated
- Unordered lists MUST be one level deep, and SHOULD use the `-` character | ||
- Ordered lists MUST be one level deep, and MUST be sequentially numbered |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've never seen this consistently implemented anywhere, and I don't think it's wise to specify and conjure it into existence
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's less about it being implemented (since there's not really anything a parser really has to do), than being commonly used in rich text editors, and something users do anyhow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do they? I think users do lists in many different ways, like 1), 1., 1:, or *, -, . they also do multi-level lists.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good point. clients should also parse those things probably. I've changed the language slightly so that the given list is what clients should add on behalf of users, but clients will have to parse a much wider range of nonsense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add that lists only hold one paragraph?
Meaning that the parser doesn't need to connect lists that are more than a new line away from each other.
This would not work, for instance.
-
Item 1: ... ... ...
.. asdjfasdf
asdfasdf
asdfasdf
asdf -
Item 2
-
Item 3
Although I mostly agree with @staab's rationale about human-writable and copyable text, and after lefting a bunch of comments, my conclusion is that actually we shouldn't specify any of these, and the only thing we really should do is follow NIP-27. Maybe mention somewhere how URLs and image URLs are usually handled, as the behavior regarding these is fairly consistent and expected. Nostrudel adds a special link every time a NIP is mentioned, should that also be standardized? I don't think so. The same principle applies to $, *, >. Emojis are also specified somewhere else and very optional. I live very well (better) without them. |
…implicity, not because it won't come up elsewhere
People are copy-pasting But I digressed. @fiatjaf I somewhat disagree. The lack of definition of what is expected of clients to render each kind is a massive UX problem. If some clients show a custom emoji and others don't, that is a problem. The scope kind, say kind 1, must decide to either use or not use custom emojis. But once the decision is made, all kind 1 clients, must follow. There is no option to not implement it. Same for rendering ln invoices, tokens, nip19 uris, etc. The more we spec what is expected to happen in each "scoping kind" (which defines the use case), the better it gets for users. |
I think it's fine. Coracle doesn't render emojis, and while it probably should, it really doesn't bother me as a user. I understand what they mean by the shortcode. Same for lnurls, cashu, urls, nip19, whatever. In fact, I use coracle in a no-media mode. Clients should have total leeway to render notes however they (their users) want. |
If that is fine, then everything is fine. We can do a full markdown post on Kind 1 and your users will still be able to read it. Which has been what Amethyst has done for years now. If there are no complaints, we can just put markdown (or any other readable format) on every kind. |
For the name, how about "Nostr Structured Text" or "Structured Note Format"? |
Let's worry about the semantics for now and change the name later. "plain text" is used all over the place already, I'm just trying to define it. |
This is not true. While things like Markdown code blocks don't hurt, Markdown links are horrible for reading anywhere that doesn't support Markdown natively, same for Markdown tables, and even those Markdown titles with leading #. I don't believe you don't understand this. What about HTML? Or LaTex, or the PDF syntax, I don't know. Any client can decide to support anything, and we certainly shouldn't expect all clients to render all these formats, but also users probably cannot read any of them comfortably. But users can read an |
By the way, the initial Markdown proposal doesn't mention anywhere the horrible https://daringfireball.net/projects/markdown/index.text See how the links are much more human-readable with the actual URLs going after the text in their own lines, and the titles are much better too. That's why Markdown was said to be "plain text with an optional rendering step", but of course soon afterwards it got corrupted, we shouldn't be complicit in that corruption. |
In any case I'm ok with merging this as an experiment. |
I agree about the If we don't provide any guidance, every dev will choose their own arbitrary line. If we do provide guidance (like what this PR is doing), then devs have at least something to be based on... |
What about markdown tables such as:
Are these human readable enough without being displayed as an actual table? Bigger the table the harder it becomes. Worth a mention in the spec? |
I don't think tables are easily readable. They're also not "light formatting", they're really structured data. |
We have tables at home. The tables at home:
|
|
NACK
|
That's what backticks are for. Anyway, this is unavoidable, clients already parse note content and render it to a greater or lesser extent. This PR is about encouraging people to opt for "lesser" |
No description provided.