Moving forward, I want to overwrite the current bold and italic via an extension. Current behavior has a number of things I want to address:
** test ** should not be valid. Tokens should not have a space directly after opening and directly before closing.
***test* test*** triple tokens are not a special token unto themselves, but are actually tokens for em nested in strong, and as such, if one of the tokens are terminating like is occurring above, it should not be recognized as a strong, em.
Triple tokens, if the single and double are smart, should act like a smart variant such that things like ***test********test*** should be (<strong><em>test********test</em></strong>). So should double and smart by themselves: **test********test** and *test********test* => <strong>test********test</strong> and <em>test********test</em>.
***test*test*** when smart rules is off, should be handled by case 5 below.
***test* test** should be <strong><em>test</em> test</strong> while ***test** test* should be <em><strong>test</strong> test</em>. For sane results, this form will not allow the this *****test** => <strong><em>*</em>test</strong> and will differ to normal strong and em <em>*</em><strong>test</strong> (output if smart rules are disabled).
For the sake of keeping the extension simple, there will be a restriction for all or nothing smart rules. So if * is smart, so should ** and same for _ and __. It would greatly reduce the complexity of the rules. It will make it easy to handle smart boundaries etc. There is no reason why you couldn't enable smart completely for _ and not on * and be get all the complexity you should need. If you are really going crazy with nesting, at that point maybe directly using strong and em tags is what is needed. So in short, when smart is enabled for * this would work text ***test*** text this would not text***test***text. But you if _ where dumb, you could do text_**test**_text and get what you need.
Moving forward, I want to overwrite the current bold and italic via an extension. Current behavior has a number of things I want to address:
** test **
should not be valid. Tokens should not have a space directly after opening and directly before closing.***test* test***
triple tokens are not a special token unto themselves, but are actually tokens for em nested in strong, and as such, if one of the tokens are terminating like is occurring above, it should not be recognized as a strong, em.***test********test***
should be (<strong><em>test********test</em></strong>
). So should double and smart by themselves:**test********test**
and*test********test*
=><strong>test********test</strong>
and<em>test********test</em>
.***test*test***
when smart rules is off, should be handled by case 5 below.***test* test**
should be<strong><em>test</em> test</strong>
while***test** test*
should be<em><strong>test</strong> test</em>
. For sane results, this form will not allow the this*****test**
=><strong><em>*</em>test</strong>
and will differ to normal strong and em<em>*</em><strong>test</strong>
(output if smart rules are disabled).*
is smart, so should**
and same for_
and__
. It would greatly reduce the complexity of the rules. It will make it easy to handle smart boundaries etc. There is no reason why you couldn't enable smart completely for_
and not on*
and be get all the complexity you should need. If you are really going crazy with nesting, at that point maybe directly using strong and em tags is what is needed. So in short, when smart is enabled for*
this would worktext ***test*** text
this would nottext***test***text
. But you if_
where dumb, you could dotext_**test**_text
and get what you need.