*hello
[
Inline(:plain, text='*hello')
]
Constrained quotes are single characters (often symbols) placed around a word.
The asterisk symbol should be around a word or a sequence of words. In this case the markup is unterminated. As a consequence the text is considered as "plain".
**hello
[
Inline(:plain, text='**hello')
]
Unconstrained quotes are repeated characters (often symbols) placed anywhere in the text, including within a word.
The double asterisk symbols should be within a word. In this case the markup is unterminated. As a consequence the text is considered as "plain".
Note
|
We could also consider that the markup is constrained on an empty text:
Simplified as:
But since the text is empty, we could consider the symbols as "plain" text:
|
***hello
- Proposal #1: constrained quote around the word "*"
-
[ Inline(:bold, text='*'), Inline(:plain, text='hello') ]
- Proposal #2: unterminated unconstrained quote around the word "*hello"
-
[ Inline(:plain, text='***hello') ]
****hello
- Proposal #1: constrained quote around the word "*"
-
[ Inline(:bold, text='*'), Inline(:plain, text='*hello') ]
The first three symbols are translated as a constrained quote around the "word" asterisk. The last symbol is an orphan and will be considered as "plain" text.
NoteIn other words, the parser should stop as soon as a constrained quote ends.
- Proposal #2: unconstrained quote around an empty text
-
[ Inline(:bold, text=''), Inline(:plain, text='hello') ]
Simplified as:
[ Inline(:plain, text='hello') ]
But since the text is empty, we could consider the symbols as "plain" text:
[ Inline(:plain, text='****hello') ]
***h**ello
- Proposal #1: Start as soon as possible
-
[ Inline(:bold, text='*h'), Inline(:plain, text='ello') ]
- Proposal #2: Start as late as possible
-
[ Inline(:plain, text='*'), Inline(:bold, text='h'), Inline(:plain, text='ello') ]
***h***ello
- Proposal #1: Start as soon as possible and end as late as possible
-
[ Inline(:bold, text='*h*'), Inline(:plain, text='ello') ]
- Proposal #2: Start as late as possible and end as soon as possible
-
[ Inline(:plain, text='*'), Inline(:bold, text='h'), Inline(:plain, text='*ello') ]
- Proposal #3: Start as soon as possible and end as soon as possible
-
[ Inline(:bold, text='*h'), Inline(:plain, text='*ello') ]