The digital nerve is palmar to the artery in the finger. A helpful way of remembering this orientation is that sensation is performed with the pads (nerve is palmar) of your fingers and you test for cap refill at the fingernail (artery is dorsal).
Illustration A shows a cross section of the finger and the relative position of the artery and the nerve.
Upper Limb: Anterior aspect of wrist & hand, in Agar AM, Lee MJ (eds): Grant’s Atlas of Anatomy, ed 10. Philadelphia, PA, Lippincott Williams & Wilkins, 1999, pp 480-505
Agur AM, Lee MJ: Grant’s Atlas of Anatomy. Philadelphia, PA, Lippincott Williams & Wilkins, 1999