From 5f8dba722bd93cf6c73cb30ff84a0b0a3a98a9b2 Mon Sep 17 00:00:00 2001 From: deni <31352787+oceansync@users.noreply.github.com> Date: Wed, 27 May 2026 02:09:18 +0300 Subject: [PATCH] docs(asynchronous-work): fix misaligned event loop ASCII diagram and add note about future changes to check live page preview Fix the misaligned diagram spacing and alignment of components. Add a HTML comment to the event loop phase diagram to clarify that the source alignment is intentional for correct HTML rendering. This prevents accidental misalignment by future contributors. --- .../event-loop-timers-and-nexttick.md | 29 ++++++++++++------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/pages/asynchronous-work/event-loop-timers-and-nexttick.md b/pages/asynchronous-work/event-loop-timers-and-nexttick.md index df13a1e..0fc91ee 100644 --- a/pages/asynchronous-work/event-loop-timers-and-nexttick.md +++ b/pages/asynchronous-work/event-loop-timers-and-nexttick.md @@ -22,29 +22,36 @@ this document) which may make async API calls, schedule timers, or call The following diagram shows a simplified overview of the event loop's order of operations. + + ``` ┌───────────────────────────┐ - │ timers │ + │ timers │ └─────────────┬─────────────┘ - │ - v + │ + v ┌───────────────────────────┐ -┌─>│ pending callbacks │ +┌─>│ pending callbacks │ │ └─────────────┬─────────────┘ │ ┌─────────────┴─────────────┐ -│ │ idle, prepare │ -│ └─────────────┬─────────────┘ ┌───────────────┐ +│ │ idle, prepare │ +│ └─────────────┬─────────────┘ ┌────────────────┐ │ ┌─────────────┴─────────────┐ │ incoming: │ -│ │ poll │<─────┤ connections, │ +│ │ poll │<─────┤ connections, │ │ └─────────────┬─────────────┘ │ data, etc. │ -│ ┌─────────────┴─────────────┐ └───────────────┘ -│ │ check │ +│ ┌─────────────┴─────────────┐ └────────────────┘ +│ │ check │ │ └─────────────┬─────────────┘ │ ┌─────────────┴─────────────┐ -│ │ close callbacks │ +│ │ close callbacks │ │ └─────────────┬─────────────┘ │ ┌─────────────┴─────────────┐ -└──┤ timers │ +└──┤ timers │ └───────────────────────────┘ ```