I have created a PR at: https://github.com/xwiki-contrib/confluence/pull/34
If probably does not handle many border cases, but should improve the import especially for: