Lucasfilm employs a guy whose job is maintaining the Star Wars canon. The position was created to avoid a repeat of incidents like a 1978 Star Wars novel that depicted Luke and Leia getting romantic.