OceanSprint / tesh

TEstable SHell sessions in Markdown
https://pypi.org/project/tesh
MIT License
133 stars 8 forks source link

fix: respect leading whitespace in example output #43

Closed h4l closed 1 year ago

h4l commented 1 year ago

Previously indented output was not matched correctly, because whitespace was not stripped consistently when parsing examples and parsing output. We now only strip trailing whitespace from examples and actual output, so all leading whitespace is maintained and must match.


BTW, as I'm accumulating quite a few PRs now, these are starting to touch the same areas. This PR will merge conflict with #41 . I've got a branch in my repo with all of the PRs integrated in order: https://github.com/OceanSprint/tesh/compare/main...h4l:tesh:h4ls-patches

zupo commented 1 year ago

Hey @h4l, I fixed CI in the main branch, could you rebase this PR off of it, please?

h4l commented 1 year ago

Hey, sure thing @zupo. Would you like the PRs rebased individually, or if it's easier I could open a new PR, rebased with the combined changes from all PRs.

zupo commented 1 year ago

Separate please!

h4l commented 1 year ago

Cool, they should all be up to date now!

h4l commented 1 year ago

I'll fix these things and rebase up to the current main.

h4l commented 1 year ago

I've fixed the merge conflict and typo in whitespace.md. There shouldn't be any more conflicts between the other PRs from here on.

h4l commented 1 year ago

h4l force-pushed the fix-leading-whitespace-matching branch from f232d90 to 0dd7a96 now

Just re-added the newlines I took out but forgot to put back from https://github.com/OceanSprint/tesh/pull/43#discussion_r1266436008

domenkozar commented 1 year ago

Thanks for all your contributions!

h4l commented 1 year ago

Thanks for review & merging @domenkozar & @zupo . Thanks for creating tesh also, it's a really useful tool.