Skip to content

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

Open
JohanKarlbergg wants to merge 1 commit intomitmproxy:mainfrom
JohanKarlbergg:fix/rst-include-trim-order
Open

fix: start-after/end-before order in _rst_include_trim#876
JohanKarlbergg wants to merge 1 commit intomitmproxy:mainfrom
JohanKarlbergg:fix/rst-include-trim-order

Conversation

@JohanKarlbergg
Copy link
Copy Markdown

@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

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.

1 participant