crystal-book icon indicating copy to clipboard operation
crystal-book copied to clipboard

Add examples on "stacking" and "overriding" certain macro hooks

Open sol-vin opened this issue 1 year ago • 3 comments

We can "stack" (not sure what else to call it) certain macro hooks like finished but something like method_missing will override previous macro hooks in the same context. Feel free to rename or whatever. 👍🏻

sol-vin avatar Oct 20 '24 13:10 sol-vin

Deploy Preview for crystal-book ready!

Name Link
Latest commit 653d961c40a1b7374858b27ed95b5204af2537a0
Latest deploy log https://app.netlify.com/sites/crystal-book/deploys/67168ba0761bf90008d69680
Deploy Preview https://deploy-preview-789--crystal-book.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Oct 20 '24 13:10 netlify[bot]

All suggestion handled 🫡

sol-vin avatar Oct 20 '24 19:10 sol-vin

Fixed whatever the markdown cop was complaining about. 👮🏻‍♂️ https://github.com/crystal-lang/crystal-book/actions/runs/11428886033

sol-vin avatar Oct 20 '24 19:10 sol-vin

Ok, ran crystal tool format but it's adding a newline which I'm pretty sure the markdown cop will cry about. Not sure what to do but it seems like there are a bunch of other examples that have crystal tool format --check errors and I didn't touch any of them. 🤷🏻‍♂️

sol-vin avatar Oct 21 '24 16:10 sol-vin

Luckily markdown cop had no whining but deploy book still failed, but none of the code is anything I added 😄

sol-vin avatar Oct 21 '24 16:10 sol-vin

It's installing Crystal's master branch, so it's failing because of the new formatter rules. Tho I'm not sure how to best fix it given you can't run the formatter on these codeblocks directly...

Blacksmoke16 avatar Oct 21 '24 17:10 Blacksmoke16

Yeah we'll ignore those failures for now. I also realized this PR should go against the current version of the book (release/1.14), so I changed the base branch. Ideally, this would affect the formatter version, but I'm not sure if it actually does.

straight-shoota avatar Oct 21 '24 17:10 straight-shoota