  We generalize a bi-Lipschitz extension result of David and Semmes from
Euclidean spaces to complete metric measure spaces with controlled geometry
(Ahlfors regularity and supporting a Poincar\'e inequality). In particular, we
find sharp conditions on metric measure spaces $X$ so that any bi-Lipschitz
embedding of a subset of the real line into $X$ extends to a bi-Lipschitz
embedding of the whole line. Along the way, we prove that if the complement of
an open subset $Y$ of $X$ has small Assouad dimension, then it is a uniform
domain. Finally, we prove a quantitative approximation of continua in $X$ by
bi-Lipschitz curves.
