drafter icon indicating copy to clipboard operation
drafter copied to clipboard

Non breaking spaces

Open abtris opened this issue 9 years ago • 3 comments

@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?

abtris avatar Feb 22 '16 16:02 abtris

@zdne commented

@jonatron I think it does. Would you be so kind and attach the file here?

abtris avatar Feb 23 '16 13:02 abtris

@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.

abtris avatar Feb 23 '16 15:02 abtris

@pksunkara commented

@kylef This is something we need to improve. I think this is the same issue @netmilk was showing us the other day.

abtris avatar Apr 07 '16 13:04 abtris