Write details shortcode so Markdown and quotes inside of details tag are rendered correctly
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Anthony Wang 2024-01-05 20:13:08 -06:00
parent cafbacfd3b
commit 0a54a08e19
Signed by: a
SSH key fingerprint: SHA256:B5ADfMCqd2M7d/jtXDoihAV/yfXOAbWWri9+GdCN4hQ
3 changed files with 7 additions and 7 deletions

View file

@ -33,12 +33,9 @@ You really think I'll just hand you the solution right away? Go outside and talk
OK, if you insist on reading the solution, here it is:
{{< rawhtml >}}
<details>
<summary>Click to show solution</summary>
{{< details "Click to show solution" >}}
The subrectangle with the smallest average brightness is just the pixel with the lowest brightness! We can find that in O(NM) time by scanning through the entire array of pixels. I also asked ChatGPT to solve this problem, and its initial attempt was an O(N^3 M^3) brute force. After asking it to improve its solution, it wrote an O(N^2 M^2) program using prefix sums, but couldn't do any better. Yay, I guess that means I have a new favorite problem for stumping LLMs, in addition to my old favorite, "What's the average aspect ratio of a human?"
</details>
{{< /rawhtml >}}
{{< /details >}}
## A variant

View file

@ -0,0 +1,4 @@
<details>
<summary>{{ .Get 0 }}</summary>
<p>{{ .Inner | markdownify }}</p>
</details>

View file

@ -1,2 +1 @@
<!-- raw html -->
{{.Inner}}
{{ .Inner }}