Changeset 103ea45 in sasmodels
- Timestamp:
- Feb 24, 2016 4:57:20 PM (9 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 431caae
- Parents:
- b7529e2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/_extensions/dollarmath.py
r19dcb933 r103ea45 12 12 import re 13 13 14 _dollar = re.compile(r"(?:^|(?<=\s ))[$]([^\n]*?)(?<![\\])[$](?:$|(?=\s|[.,;\\]))")14 _dollar = re.compile(r"(?:^|(?<=\s|[(]))[$]([^\n]*?)(?<![\\])[$](?:$|(?=\s|[.,;)\\]))") 15 15 _notdollar = re.compile(r"\\[$]") 16 16 … … 51 51 assert replace_dollar(u"dollar\$ escape")==u"dollar$ escape" 52 52 assert replace_dollar(u"dollar \$escape\$ too")==u"dollar $escape$ too" 53 assert replace_dollar(u"spaces $in the$ math")==u"spaces :math:`in the` math" 53 54 assert replace_dollar(u"emb\ $ed$\ ed")==u"emb\ :math:`ed`\ ed" 54 55 assert replace_dollar(u"$first$a")==u"$first$a" 55 56 assert replace_dollar(u"a$last$")==u"a$last$" 57 assert replace_dollar(u"$37")==u"$37" 58 assert replace_dollar(u"($37)")==u"($37)" 59 assert replace_dollar(u"$37 - $43")==u"$37 - $43" 60 assert replace_dollar(u"($37, $38)")==u"($37, $38)" 56 61 assert replace_dollar(u"a $mid$dle a")==u"a $mid$dle a" 62 assert replace_dollar(u"a ($in parens$) a")==u"a (:math:`in parens`) a" 63 assert replace_dollar(u"a (again $in parens$) a")==u"a (again :math:`in parens`) a" 57 64 58 65 if __name__ == "__main__":
Note: See TracChangeset
for help on using the changeset viewer.