-
Notifications
You must be signed in to change notification settings - Fork 94
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
@
-tags delimiter
#1226
Comments
|
4 is also my favourite |
I'm also happy with 4 - though it's worth mentioning that any instance of |
Oh no, I did not think about that... Thanks for pointing it out. Having to escape them seems cumbersome: |
I don't understand why this is the case. |
The doc seems not to be perfectly up to date with regards to code blocks, but one can specify a language as well as some other metadata information in a code block. Example:
The language name (
|
Ah yes :-( Thanks for the explanation. In practice you'd have to escape only the first '[' but it is a bit annoying. Some quick ideas. Perhaps combining 3 and 4 and have for example:
I think 2. could be ok no ? |
Yes, I think 2. could be OK, but let's continue a bit the list before choosing :)
What I like about 6 and 6' is that we can easily add plugins which rewrite the extension node, if we allow them to be named: |
But couldn't Regarding 5, personally I rather have the directive in the braces that's the Regarding 6, I think code blocks are sufficient for that. For example |
Yes, mermaid was a bad example... Maybe a custom kind of admonition would be a better example.
(although I agree that code blocks are sufficient, you can run the parser on them) |
Another option that was suggested (I'm collecting them): Base the scope of the tag on indentation:
I think this does not integrate well with the current odoc syntax (no current syntax is affected by indentation). #1219 is an example among others). It could be a new direction, but that's a big change. However, it is worth mentioning since some people tried that. |
Regarding 6, let me add that we could slightly modify it to distinguish inline and block "extension nodes" :
Currently this is my personal preference since I think it will be useful for the future, if one day plugins are possible. Without a name, it is simply grouping a list of blocks into a single blocks (thus we can group blocks under a tag). However, maybe 4. ( |
We discussed this during the dev meeting. First, we do not want a grouping syntax independently of tags, as proposed in 5. and 6. Indeed, custom tags already exist in ocamldoc, and we would use that if we add "plugin support". Here are some properties that were mentioned as nice to have (with various weight), for the syntax to group blocks in a tag:
We looked at the existing options. Some new syntax were also proposed:
Option 8. was the most convincing option at the end of the meeting. Footnotes
|
I do not like the fact that option 8 is so sensitive to whitespace, I am afraid this will lead to a lot of mistakes.
is a code block, but
is a grouped tag. I think it is more intuitive to have |
Similarly, For me, the issue with
makes it look like
You should open an issue upstream to fix this. |
Just as an aside, @panglesd found that lists not only have this issue but also have a solution:
and
which makes me sad again that |
I think it is clear from #1138 that tags should not expand unconditionally to the rest of the content.
So we need a way to have tags extend to several paragraphs. To make the discussion clearer, I open this issue separately from #1138 (which is about "what is the range of undelimited tags").
Here are the various options that I have recollected:
@
on an empty line adds the next block in the tag@begin-block ... @end-block
delimiter:{| |}
delimiter:{@ ...}
delimitation:Option 1. is weird to me (it can be explained, if we decide to delimit the range of an undelimited tag block with blank lines).
Option 2. I'm not a fan since it feels quite orthogonal to what is currently used to delimit, in the odoc syntax.
Option 3. is similar to option 2, replacing 11 letters with 2 symbols. Still orthogonal, I think!
Option 4. is clearly my favorite, as it seems to integrate naturally in the odoc way of delimiting.
Feel free to comment, suggest another syntax, ... like and subscribe!
The text was updated successfully, but these errors were encountered: