[Continues 68414526]: refactor workspaceBlockToCode