Yeah, line numbering is tricky. That's why we hide the numbers when you click -- it's a mode that's built into CodeRay.
Note you can still just paste github gists on their own line and we expand those too -- so that's still another option.
Also you can probably just hide line numbers completely using CSS if you customize your theme.