::::::::::::::::::::::::: comment ::::::::::::::::::::::::::::::::::
This text is completely ignored by kramdown - a comment in the text.
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Do you see ::comment[ this text ]?
::comment[ some other comment ]
::options{ key="val" }
Using my concept:
!comment::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
This text is completely ignored by kramdown - a comment in the text.
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Do you see !comment[ this text ]?
!comment[ some other comment ]
!options{ key="val" }
Example from kramdown does not allow content indentation, liked by some writers. And iām not sure that itās possible to make markup good for blocks and inlines in the same time. Thatās why this topic was created separately.
:: should be changed since it is commonly used as namespace marker and that might or might not clash. @ had been considered and discarded since it used in @user and such.
{: and {:: are almost safe. and probably also !name[...]{} might be easy to parse.
.. py:function:: send_message(sender, recipient, message_body, [priority=1])
Send a message to a recipient
:param str sender: The person sending the message
:param str recipient: The recipient of the message
:param str message_body: The body of the message
:param priority: The priority of the message, can be a number 1-5
:type priority: integer or None
:return: the message id
:rtype: int
:raises ValueError: if the message_body exceeds 160 characters
:raises TypeError: if the message_body is not a basestring
using the !name notation
!py:function[send_message(sender, recipient, message_body, [priority=1])]::
Send a message to recipient
::
{param=str name=sender desc="The person sending the message"}
{param=str ....
This does not look that nice and would require the implementation to not collapse the key-value attribute attached to nodes but keep a a key-list_of_values.
Probably if I want to keep my sanity while Iām trying to support this sphinx feature might be just better do something like
!sphinx::
.. py:function:: send_message(sender, recipient, message_body, [priority=1])
Send a message to a recipient
:param str sender: The person sending the message
:param str recipient: The recipient of the message
:param str message_body: The body of the message
:param priority: The priority of the message, can be a number 1-5
:type priority: integer or None
:return: the message id
:rtype: int
:raises ValueError: if the message_body exceeds 160 characters
:raises TypeError: if the message_body is not a basestring
::
or use {::sphinx} and {:/} using the kramdown syntax.
Iām looking into sphinx + markdown since it would be something the rust people are also evaluating the mix.
using the indent-block syntax it would have the neat feature of degrade nicely on parsers not supporting it:
:: extension
this is a part of the extension
this as well
:: options might be freeform strings
:: or be=otherwise key=value
Would render as
:: extension
this is a part of the extension
this as well
:: options might be freeform strings
:: or be=otherwise key=value
it would reuse the same logic used by the code and would be mainly compatible with rst.
:: py:function[send_message(sender, recipient, message_body, [priority=1])]
Send a message to a recipient
:: param str sender: The person sending the message
:: param str recipient: The recipient of the message
:: param str message_body: The body of the message
:: param priority: The priority of the message, can be a number 1-5
:: type priority: integer or None
:: return: the message id
:: rtype: int
:: raises ValueError: if the message_body exceeds 160 characters
:: raises TypeError: if the message_body is not a basestring
Thatās all was discussed in spoiler thread. Indented markup is nice, but hard to use without appropriate editor (to quote blocks, for example).
There are people, who like it, and who dislike it. Thatās personal and canāt be changed. I think, good spec should cover both styles, with single universal, or with 2 separate markups.
PS. may be fenced containers are not the best, but those allows to use both styles.
Just noticed that @vitaly 's https://markdown-it.github.io/ demo contains custom containers. Glad to see that it it works well at the very least as a container format. Degrades rather gracefully as well. Great work!
Would be interesting to see how people find containers, and if it causes any problem. Also if itās possible to use it as a container for latex maths or something like that.
:::: warning ::::
*here be dragons*
:::::::::::::::::
Degrades to :::: warning :::: here be dragons ::::::::::::::::: in common-mark strict mode. Else it uses warning as the classname to wrap around the *here be dragon* content.