Put in order · Vibe coding with Claude Code course · Module 12: Medium clone

A highlight step by step

Put in order what happens to a highlight in the corrected version from the lesson:

Items to put in order

  • A sorted copy of the highlights splits the block's text into pieces
  • offsetsInBlock counts start and end from the start of the block's text
  • The highlight goes into state if it does not overlap another in this block
  • The highlighted pieces go into the <mark> tag
  • The reader selects a passage in one paragraph

You can check the correct answer by solving this task in the CodeWorlds game.