Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert Listings in Chapters 06-10 to <Listing> #3973

Conversation

SpectralPixel
Copy link
Contributor

@SpectralPixel SpectralPixel commented Jul 12, 2024

Closed in favor of #3977, #3978, #3979, #3980 & #3981

Finally, here are the chapters adapted to the new <Listing> pre-processor. I'm not sure if everything works as intended since I couldn't get mdbook to behave properly on my machine, so please check the sanity of my changes.

I also changed numberless listings (as in, they have a file name, but no number), so feel free to revert those commits if they are not yet fully functional by the time they will be merged.

Please also check all the comments I have left in commit descriptions and the issue thread for further concerns I might have about the code.

Issue #3919

My bad, when I copy and pasted the captions from the `<span>` into the `<Listing>`, I failed to realize that my text editor copied over the line numbers into the strings. Removed them, should be all good now.
I am unsure whether this `<Listing>` will work properly due to no number being associated with it. @chriskrycho , since you implemented the pre-processor, could you please comment?
(Sorry if there is a way that I could have checked this myself, I am unsure how to build the book. I'm just editing in plain-text and crossing my fingers, hope the whole thing doesn't come crumbling down when it's built.)
…READ DESC.)]

I'm unsure whether wrapping the text may cause the listing text to be wrapped too as the newlines are found within quotation marks. If it causes issues, feel free to revert this commit. Another odd thing is that my editor uncolored the closing `</Listing>` tag when I split the lines. Maybe the newline characters need to be escaped with a backslash?
Once again, this is untested code because I'm unsure how to test the book with the `<Listing>` preprocessor (and therefore don't know what my changes look like), as it hasn't been upstreamed yet and no instructions have been given on how to get the indev version to work.
@SpectralPixel SpectralPixel changed the title Convert Listings in Chapters 06-10 to <Listing> (#3919) Convert Listings in Chapters 06-10 to <Listing> ( #3919 ) Jul 12, 2024
@SpectralPixel SpectralPixel changed the title Convert Listings in Chapters 06-10 to <Listing> ( #3919 ) Convert Listings in Chapters 06-10 to <Listing> #3919 Jul 12, 2024
@SpectralPixel SpectralPixel changed the title Convert Listings in Chapters 06-10 to <Listing> #3919 Convert Listings in Chapters 06-10 to <Listing> Jul 12, 2024
@chriskrycho
Copy link
Contributor

Thanks! I'll give it a look next week! If you’re up for it, would you mind splitting this into per-chapter PRs? That will make it way easier to land iteratively!

@SpectralPixel
Copy link
Contributor Author

I'll split them this week

@chriskrycho
Copy link
Contributor

Excellent – thanks!

@SpectralPixel
Copy link
Contributor Author

Thanks! I'll give it a look next week! If you’re up for it, would you mind splitting this into per-chapter PRs? That will make it way easier to land iteratively!

Alright, I've opened the new PRs

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