Skip to content

fix: start-after/end-before order in _rst_include_trim#876

Merged
mhils merged 3 commits intomitmproxy:mainfrom
JohanKarlbergg:fix/rst-include-trim-order
Apr 13, 2026
Merged

fix: start-after/end-before order in _rst_include_trim#876
mhils merged 3 commits intomitmproxy:mainfrom
JohanKarlbergg:fix/rst-include-trim-order

Conversation

@JohanKarlbergg
Copy link
Copy Markdown
Contributor

@JohanKarlbergg JohanKarlbergg commented Mar 31, 2026

Hi,

It looks like start-after and end-before may be applied in the wrong order. From how I read the docutils spec, end-before is defined as matching content before the first occurrence of the specified text, but still after any start-after text. That suggests the current behavior might be reversed, though I may be misunderstanding it.

My use case is to include the text between two markers, for example """ and """.

https://docutils.sourceforge.io/docs/ref/rst/directives.html#include-options

Copy link
Copy Markdown
Member

@mhils mhils left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! 😃 Do you want to add a CHANGELOG entry?

@JohanKarlbergg
Copy link
Copy Markdown
Contributor Author

Thank you! 😃 Do you want to add a CHANGELOG entry?

Sure :)

@JohanKarlbergg JohanKarlbergg force-pushed the fix/rst-include-trim-order branch from 4fc636d to b762a36 Compare April 13, 2026 11:25
Copy link
Copy Markdown
Member

@mhils mhils left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@mhils mhils enabled auto-merge (squash) April 13, 2026 17:07
@mhils mhils merged commit 00e18eb into mitmproxy:main Apr 13, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants