drafter
drafter copied to clipboard
Non breaking spaces
@jonatron opened apiaryio/snowcrash#370
I had a non breaking space (0xA0) in my apib file after a # in a heading, and it was very hard to find out that it was causing me problems, because obviously they look the same as normal (0x20) spaces. Does it make sense to look for these?
@jonatron commented
Here's an example file demonstrating the issue I had. (Note copying and pasting doesn't preserve the nbsp, download it). https://raw.githubusercontent.com/jonatron/apiary_nbsp/master/test_apiary.apib Which gives these warnings:
>> Line 14: unexpected header block, expected a group, resource or an action definition, e.g. '# Group <name>', '# <resource name> [<URI>]' or '# <HTTP method> <URI>' (warning code 5)
>> Line 16: action with method 'GET' already defined for resource '/api/channels/' (warning code 2)
If this is unlikely to be picked up by the current snowcrash devs, I might be able to have a go at playing with the snowcrash code at some point.
@pksunkara commented
@kylef This is something we need to improve. I think this is the same issue @netmilk was showing us the other day.