Commit 98e2596
committed
perf: memoize syntax highlighting in CodeBlock
hljs.highlightAuto() ran inline in the template on every render.
Move it to a reactive statement so it only runs when code or lang changes.1 parent f2f7776 commit 98e2596
1 file changed
Lines changed: 9 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
56 | 64 | | |
57 | 65 | | |
58 | 66 | | |
| |||
62 | 70 | | |
63 | 71 | | |
64 | 72 | | |
65 | | - | |
66 | 73 | | |
67 | 74 | | |
68 | 75 | | |
| |||
544 | 551 | | |
545 | 552 | | |
546 | 553 | | |
547 | | - | |
548 | | - | |
| 554 | + | |
549 | 555 | | |
550 | 556 | | |
551 | 557 | | |
| |||
0 commit comments