This PR closes #38 by adding an extra to disable emphasis syntax when in the middle of a word.
The current behaviour of the library is to always convert this_text_here to this<em>text</em>here. However, this is not always desirable, as highlighted in #38.
The new middle-word-em extra will allow users to allow (default) or disallow this behaviour by passing extras={'middle-word-em': True/False}. When disabled, any emphasis will be required to have a word boundary (r'\b') surrounding it.
For backwards compatibility, I've kept the default behaviour as allowing middle word emphasis. Users must explicitly disable it. Passing extras=['middle-word-em'] will not work.
This PR closes #38 by adding an extra to disable emphasis syntax when in the middle of a word.
The current behaviour of the library is to always convert
this_text_here
tothis<em>text</em>here
. However, this is not always desirable, as highlighted in #38.The new
middle-word-em
extra will allow users to allow (default) or disallow this behaviour by passingextras={'middle-word-em': True/False}
. When disabled, any emphasis will be required to have a word boundary (r'\b'
) surrounding it.For backwards compatibility, I've kept the default behaviour as allowing middle word emphasis. Users must explicitly disable it. Passing
extras=['middle-word-em']
will not work.