markdown-environments 2.0.0__tar.gz → 2.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (182) hide show
  1. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/PKG-INFO +1 -1
  2. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/src/markdown_environments/__init__.py +1 -1
  3. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/src/markdown_environments/nested_env.py +19 -8
  4. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/nested_env/success_3_expected.txt +2 -1
  5. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/nested_env/success_4_expected.txt +2 -2
  6. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/nested_env/test_nested_env.py +13 -6
  7. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/.github/dependabot.yml +0 -0
  8. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/.github/workflows/publish.yaml +0 -0
  9. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/.gitignore +0 -0
  10. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/.readthedocs.yaml +0 -0
  11. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/CONTRIBUTING.md +0 -0
  12. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/LICENSE +0 -0
  13. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/README.md +0 -0
  14. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/docs/Makefile +0 -0
  15. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/docs/_static/css/custom.css +0 -0
  16. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/docs/api.rst +0 -0
  17. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/docs/conf.py +0 -0
  18. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/docs/contributing.rst +0 -0
  19. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/docs/example_usage.rst +0 -0
  20. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/docs/index.rst +0 -0
  21. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/docs/requirements.txt +0 -0
  22. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/pyproject.toml +0 -0
  23. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/requirements.txt +0 -0
  24. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/src/markdown_environments/div.py +0 -0
  25. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/src/markdown_environments/dropdown.py +0 -0
  26. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/src/markdown_environments/thms.py +0 -0
  27. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/src/markdown_environments/thms_impls_base.py +0 -0
  28. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/src/markdown_environments/utils.py +0 -0
  29. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/__init__.py +0 -0
  30. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/conftest.py +0 -0
  31. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/div/__init__.py +0 -0
  32. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/div/fail_1.txt +0 -0
  33. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/div/fail_1_expected.txt +0 -0
  34. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/div/fail_2.txt +0 -0
  35. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/div/fail_2_expected.txt +0 -0
  36. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/div/fail_3.txt +0 -0
  37. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/div/fail_3_expected.txt +0 -0
  38. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/div/success_1.txt +0 -0
  39. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/div/success_1_expected.txt +0 -0
  40. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/div/success_2.txt +0 -0
  41. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/div/success_2_expected.txt +0 -0
  42. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/div/test_div.py +0 -0
  43. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/dropdown/__init__.py +0 -0
  44. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/dropdown/fail_1.txt +0 -0
  45. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/dropdown/fail_1_expected.txt +0 -0
  46. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/dropdown/fail_2.txt +0 -0
  47. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/dropdown/fail_2_expected.txt +0 -0
  48. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/dropdown/fail_3.txt +0 -0
  49. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/dropdown/fail_3_expected.txt +0 -0
  50. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/dropdown/fail_4.txt +0 -0
  51. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/dropdown/fail_4_expected.txt +0 -0
  52. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/dropdown/fail_5.txt +0 -0
  53. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/dropdown/fail_5_expected.txt +0 -0
  54. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/dropdown/fail_6.txt +0 -0
  55. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/dropdown/fail_6_expected.txt +0 -0
  56. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/dropdown/success_1.txt +0 -0
  57. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/dropdown/success_1_expected.txt +0 -0
  58. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/dropdown/success_2.txt +0 -0
  59. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/dropdown/success_2_expected.txt +0 -0
  60. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/dropdown/test_dropdown.py +0 -0
  61. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/nested_env/__init__.py +0 -0
  62. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/nested_env/fail_1.txt +0 -0
  63. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/nested_env/fail_1_expected.txt +0 -0
  64. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/nested_env/fail_2.txt +0 -0
  65. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/nested_env/fail_2_expected.txt +0 -0
  66. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/nested_env/fail_3.txt +0 -0
  67. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/nested_env/fail_3_expected.txt +0 -0
  68. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/nested_env/fail_4.txt +0 -0
  69. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/nested_env/fail_4_expected.txt +0 -0
  70. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/nested_env/success_1.txt +0 -0
  71. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/nested_env/success_1_expected.txt +0 -0
  72. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/nested_env/success_2.txt +0 -0
  73. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/nested_env/success_2_expected.txt +0 -0
  74. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/nested_env/success_3.txt +0 -0
  75. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/nested_env/success_4.txt +0 -0
  76. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/nesting/__init__.py +0 -0
  77. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/nesting/docs_behavior_1.txt +0 -0
  78. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/nesting/docs_behavior_1_expected.txt +0 -0
  79. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/nesting/test_nesting.py +0 -0
  80. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/tests_utils.py +0 -0
  81. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/__init__.py +0 -0
  82. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/fail_1.txt +0 -0
  83. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/fail_1_expected.txt +0 -0
  84. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/fail_2.txt +0 -0
  85. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/fail_2_expected.txt +0 -0
  86. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/fail_3.txt +0 -0
  87. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/fail_3_expected.txt +0 -0
  88. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/success_1.txt +0 -0
  89. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/success_1_expected.txt +0 -0
  90. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/success_2.txt +0 -0
  91. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/success_2_expected.txt +0 -0
  92. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/success_3.txt +0 -0
  93. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/success_3_expected.txt +0 -0
  94. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/success_4.txt +0 -0
  95. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/success_4_expected.txt +0 -0
  96. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/success_5.txt +0 -0
  97. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/success_5_expected.txt +0 -0
  98. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/success_6.txt +0 -0
  99. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/success_6_expected.txt +0 -0
  100. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/success_7.txt +0 -0
  101. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/success_7_expected.txt +0 -0
  102. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/success_8.txt +0 -0
  103. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/success_8_expected.txt +0 -0
  104. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/test_thms.py +0 -0
  105. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/thm_counter/__init__.py +0 -0
  106. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/thm_counter/fail_1.txt +0 -0
  107. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/thm_counter/fail_1_expected.txt +0 -0
  108. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/thm_counter/success_1.txt +0 -0
  109. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/thm_counter/success_1_expected.txt +0 -0
  110. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/thm_counter/success_2.txt +0 -0
  111. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/thm_counter/success_2_expected.txt +0 -0
  112. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/thm_counter/success_3.txt +0 -0
  113. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/thm_counter/success_3_expected.txt +0 -0
  114. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/thm_counter/success_4.txt +0 -0
  115. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/thm_counter/success_4_expected.txt +0 -0
  116. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/thm_counter/success_5.txt +0 -0
  117. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/thm_counter/success_5_expected.txt +0 -0
  118. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/thm_counter/test_thm_counter.py +0 -0
  119. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/thm_heading/__init__.py +0 -0
  120. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/thm_heading/fail_1.txt +0 -0
  121. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/thm_heading/fail_1_expected.txt +0 -0
  122. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/thm_heading/success_1.txt +0 -0
  123. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/thm_heading/success_1_expected.txt +0 -0
  124. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/thm_heading/success_2.txt +0 -0
  125. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/thm_heading/success_2_expected.txt +0 -0
  126. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/thm_heading/success_3.txt +0 -0
  127. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/thm_heading/success_3_expected.txt +0 -0
  128. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/thm_heading/success_4.txt +0 -0
  129. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/thm_heading/success_4_expected.txt +0 -0
  130. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/thm_heading/success_5.txt +0 -0
  131. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/thm_heading/success_5_expected.txt +0 -0
  132. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/thm_heading/success_6.txt +0 -0
  133. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/thm_heading/success_6_expected.txt +0 -0
  134. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/thm_heading/success_7.txt +0 -0
  135. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/thm_heading/success_7_expected.txt +0 -0
  136. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/thm_heading/success_8.txt +0 -0
  137. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/thm_heading/success_8_expected.txt +0 -0
  138. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/thm_heading/test_thm_heading.py +0 -0
  139. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/thm_ref/__init__.py +0 -0
  140. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/thm_ref/fail_1.txt +0 -0
  141. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/thm_ref/fail_1_expected.txt +0 -0
  142. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/thm_ref/success_1.txt +0 -0
  143. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/thm_ref/success_1_expected.txt +0 -0
  144. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/thm_ref/success_2.txt +0 -0
  145. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/thm_ref/success_2_expected.txt +0 -0
  146. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/thm_ref/success_3.txt +0 -0
  147. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/thm_ref/success_3_expected.txt +0 -0
  148. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/thm_ref/success_4.txt +0 -0
  149. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/thm_ref/success_4_expected.txt +0 -0
  150. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/thm_ref/success_5.txt +0 -0
  151. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/thm_ref/success_5_expected.txt +0 -0
  152. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms/thm_ref/test_thm_ref.py +0 -0
  153. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms_impls_base/__init__.py +0 -0
  154. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms_impls_base/gen_thm_heading_md_1.txt +0 -0
  155. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms_impls_base/gen_thm_heading_md_1_expected.txt +0 -0
  156. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms_impls_base/gen_thm_heading_md_2.txt +0 -0
  157. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms_impls_base/gen_thm_heading_md_2_expected.txt +0 -0
  158. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms_impls_base/gen_thm_heading_md_3.txt +0 -0
  159. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms_impls_base/gen_thm_heading_md_3_expected.txt +0 -0
  160. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms_impls_base/gen_thm_heading_md_4.txt +0 -0
  161. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms_impls_base/gen_thm_heading_md_4_expected.txt +0 -0
  162. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms_impls_base/gen_thm_heading_md_5.txt +0 -0
  163. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms_impls_base/gen_thm_heading_md_5_expected.txt +0 -0
  164. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms_impls_base/gen_thm_heading_md_6.txt +0 -0
  165. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms_impls_base/gen_thm_heading_md_6_expected.txt +0 -0
  166. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms_impls_base/gen_thm_heading_md_7.txt +0 -0
  167. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms_impls_base/gen_thm_heading_md_7_expected.txt +0 -0
  168. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms_impls_base/gen_thm_heading_md_8.txt +0 -0
  169. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms_impls_base/gen_thm_heading_md_8_expected.txt +0 -0
  170. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms_impls_base/prepend_thm_heading_md_1.txt +0 -0
  171. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms_impls_base/prepend_thm_heading_md_1_expected.txt +0 -0
  172. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms_impls_base/prepend_thm_heading_md_2.txt +0 -0
  173. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms_impls_base/prepend_thm_heading_md_2_expected.txt +0 -0
  174. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms_impls_base/prepend_thm_heading_md_3.txt +0 -0
  175. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms_impls_base/test_method_1.txt +0 -0
  176. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms_impls_base/test_method_2.txt +0 -0
  177. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms_impls_base/test_method_3.txt +0 -0
  178. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms_impls_base/test_method_4.txt +0 -0
  179. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms_impls_base/test_method_5.txt +0 -0
  180. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/thms_impls_base/test_thms_impls_base.py +0 -0
  181. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/utils/__init__.py +0 -0
  182. {markdown_environments-2.0.0 → markdown_environments-2.1.0}/tests/utils/test_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: markdown-environments
3
- Version: 2.0.0
3
+ Version: 2.1.0
4
4
  Summary: Highly customizable extensions for Python-Markdown in the style of LaTeX environments/theorems
5
5
  Project-URL: Homepage, https://github.com/AnonymousRand/python_markdown_environments
6
6
  Project-URL: Documentation, https://python-markdown-environments.readthedocs.io
@@ -24,4 +24,4 @@ from .nested_env import NestedEnvExtension
24
24
  from .thms import ThmsExtension
25
25
 
26
26
 
27
- __version__ = "2.0.0"
27
+ __version__ = "2.1.0"
@@ -121,10 +121,15 @@ class NestedEnvProcessor(BlockProcessor):
121
121
  html_class = self.html_class + " " + self.type_opts["html_class"]
122
122
  outer_elem.set("class", html_class)
123
123
  self.parser.parseBlocks(outer_elem, blocks[:i + 1])
124
- if self.type_opts["inner_pos"] == "start":
125
- outer_elem.insert(0, inner_elem)
126
- elif self.type_opts["inner_pos"] == "end":
127
- outer_elem.append(inner_elem)
124
+ match self.type_opts["inner_pos"]:
125
+ case "start":
126
+ outer_elem.insert(0, inner_elem)
127
+ case "end":
128
+ outer_elem.append(inner_elem)
129
+ case "end_outside":
130
+ parent.append(inner_elem)
131
+ case _:
132
+ raise ValueError("how did we get here")
128
133
  # remove used blocks
129
134
  for _ in range(i + 1):
130
135
  blocks.pop(0)
@@ -190,6 +195,8 @@ class NestedEnvExtension(Extension):
190
195
  of course, there are blank lines before and after the inner block.
191
196
  """
192
197
 
198
+ ALLOWED_INNER_POS = ["start", "end", "end_outside"];
199
+
193
200
  def __init__(self, **kwargs):
194
201
  """
195
202
  Initialize nested env extension, with configuration options passed as the following
@@ -216,8 +223,9 @@ class NestedEnvExtension(Extension):
216
223
  that type. Must be set.
217
224
  - **inner_html_class** (*str*) -- HTML `class` attribute to add to inner parts of all
218
225
  nested envs of that type. Defaults to `""`.
219
- - **inner_pos** (*str*) -- one of "start" or "end" specifying if the inner part should
220
- be placed at the start or end of the outer part. Must be set.
226
+ - **inner_pos** (*str*) -- one of "start", "end", or "end_outside" specifying if
227
+ the inner part should be placed at the start of, end of, or after (respectively)
228
+ the outer part. Must be set.
221
229
  """
222
230
 
223
231
  self.config = {
@@ -247,8 +255,11 @@ class NestedEnvExtension(Extension):
247
255
  f"nested env: {typ}.html_tag, {typ}.inner, "
248
256
  f"{typ}.inner_html_tag, or {typ}.inner_pos key was not defined"
249
257
  )
250
- if opts["inner_pos"] not in ["start", "end"]:
251
- raise KeyError(f"nested env: {typ}.inner_pos is not one of `start` or `end`")
258
+ if opts["inner_pos"] not in self.ALLOWED_INNER_POS:
259
+ raise ValueError(
260
+ f"nested env: {typ}.inner_pos is \"{opts['inner_pos']}\", which is not one of "
261
+ f"{self.ALLOWED_INNER_POS}"
262
+ )
252
263
 
253
264
  def extendMarkdown(self, md):
254
265
  md.parser.blockprocessors.register(
@@ -4,4 +4,5 @@ never gonna let you down<br>
4
4
  never gonna run around and desert you</p>
5
5
  <p>peekaboo
6
6
  </p>
7
- <cite class="hewwo"><p>-- richard paul astley</p></cite></blockquote>
7
+ </blockquote>
8
+ <cite class="hewwo"><p>-- richard paul astley</p></cite>
@@ -12,5 +12,5 @@ never gonna let you down<br>
12
12
  never gonna run around and desert you</p>
13
13
  <p>peekaboo
14
14
  </p>
15
- <cite class="hewwo"><p>-- richard paul astley</p></cite></blockquote>
16
- <p>brock</p>
15
+ </blockquote>
16
+ <cite class="hewwo"><p>-- richard paul astley</p></cite><p>brock</p>
@@ -39,7 +39,7 @@ from ..tests_utils import run_extension_test
39
39
  "inner": "citation",
40
40
  "inner_html_tag": "cite",
41
41
  "inner_html_class": "hewwo",
42
- "inner_pos": "end"
42
+ "inner_pos": "end_outside"
43
43
  }
44
44
  }),
45
45
  "nested_env/success_3",
@@ -51,7 +51,7 @@ from ..tests_utils import run_extension_test
51
51
  "inner": "citation",
52
52
  "inner_html_tag": "cite",
53
53
  "inner_html_class": "hewwo",
54
- "inner_pos": "end"
54
+ "inner_pos": "end_outside"
55
55
  },
56
56
  "random": {
57
57
  "html_tag": "div",
@@ -115,7 +115,7 @@ def test_nested_env(extension, filename_base):
115
115
 
116
116
 
117
117
  @pytest.mark.parametrize(
118
- "config, expected_error_text",
118
+ "config, expected_exception, expected_error_text",
119
119
  [
120
120
  (
121
121
  {
@@ -127,6 +127,7 @@ def test_nested_env(extension, filename_base):
127
127
  }
128
128
  }
129
129
  },
130
+ KeyError,
130
131
  (
131
132
  "nested env: missing_html_tag.html_tag, missing_html_tag.inner, "
132
133
  "missing_html_tag.inner_html_tag, or missing_html_tag.inner_pos key was not defined"
@@ -142,6 +143,7 @@ def test_nested_env(extension, filename_base):
142
143
  }
143
144
  }
144
145
  },
146
+ KeyError,
145
147
  (
146
148
  "nested env: missing_inner.html_tag, missing_inner.inner, "
147
149
  "missing_inner.inner_html_tag, or missing_inner.inner_pos key was not defined"
@@ -157,6 +159,7 @@ def test_nested_env(extension, filename_base):
157
159
  }
158
160
  }
159
161
  },
162
+ KeyError,
160
163
  (
161
164
  "nested env: missing_inner_html_tag.html_tag, missing_inner_html_tag.inner, "
162
165
  "missing_inner_html_tag.inner_html_tag, or missing_inner_html_tag.inner_pos key "
@@ -173,6 +176,7 @@ def test_nested_env(extension, filename_base):
173
176
  }
174
177
  }
175
178
  },
179
+ KeyError,
176
180
  (
177
181
  "nested env: missing_inner_pos.html_tag, missing_inner_pos.inner, "
178
182
  "missing_inner_pos.inner_html_tag, or missing_inner_pos.inner_pos key "
@@ -188,6 +192,7 @@ def test_nested_env(extension, filename_base):
188
192
  }
189
193
  }
190
194
  },
195
+ KeyError,
191
196
  (
192
197
  "nested env: missing_multiple.html_tag, missing_multiple.inner, "
193
198
  "missing_multiple.inner_html_tag, or missing_multiple.inner_pos key was not defined"
@@ -204,14 +209,16 @@ def test_nested_env(extension, filename_base):
204
209
  }
205
210
  }
206
211
  },
212
+ ValueError,
207
213
  (
208
- "nested env: bad_inner_pos_value.inner_pos is not one of `start` or `end`"
214
+ "nested env: bad_inner_pos_value.inner_pos is \"mrrp\", which is not one of "
215
+ "['start', 'end', 'end_outside']"
209
216
  )
210
217
  )
211
218
  ]
212
219
  )
213
- def test_nested_env_errors(config, expected_error_text):
214
- with pytest.raises(KeyError) as e:
220
+ def test_nested_env_errors(config, expected_exception, expected_error_text):
221
+ with pytest.raises(expected_exception) as e:
215
222
  _ = NestedEnvExtension(**config)
216
223
  print(f"captured exception: {e.value}")
217
224
  assert expected_error_text in str(e.value)