Closed chrisjsewell closed 3 years ago
Congrats on your first merged pull request in this project! :tada:
Thank you for contributing, we are very proud of you! :heart:
@chrisjsewell I'd like to review before merging please. Also, I actually prefer the original configuration and Poetry in projects that have dependencies.
Regarding the repo transfer, my thinking was that it happened on similar terms as mdformat.
Absolutely happy to wait for your review, but err I would say this is slightly different to mdformat, in that obviously I am moreso the expert on MyST and know what needs to be in this package before I'm happy to start advertising/endorsing it on myst-parser etc.
Also, there was an undocumented bug where the first line is too wide when --wrap=INTEGER is used
this seems like a bug of mdformat no? It should be able to understand when the paragraph is in an "indented environment".
I note there is also env["indent_width"]
in mdformat, but it is not clear to me how/if this should be used by plugins?
this seems like a bug of mdformat no?
No I wouldn't consider this an mdformat bug. I made an issue in mdformat to document env["indent_width"]
. Basically that is the way to signal an "indented environment" that you mentioned. Why it's not documented is because I wasn't fully happy with the solution at the time so was hoping nobody would notice it, use it, or mention it, lol, before I come up with a better solution.
because I wasn't fully happy with the solution
maybe have it as a context manager:
with context.indented(4):
Yeah that needs to be added for sure, thanks for reminding me. I deliberately didn't add the context manager at the time to avoid making the indent system public API and "official" :smile:
I think the alternative I considered was a bit reversed logic where there is a mapping from syntax name to indent width of that syntax, and then the paragraph render function, before wrapping, would add up the total indent width based on syntax types of its ancestors.
Now thinking about it, I think the system in place (along with the context manager) is probably the better and more flexible way to do this. So maybe time to just create the context manager and document it.
Anyways, the real problem with footnotes and any of these indent systems is that the first line is special and should be wrapped with a narrower indent width.
Codecov Report
92.85% <0.00%> (?)
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.