apiaryio / drafter

API Blueprint Parser (C++)
https://apiblueprint.org/
MIT License
301 stars 54 forks source link

Non breaking spaces #632

Open abtris opened 8 years ago

abtris commented 8 years ago

@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 commented 8 years ago

@zdne commented

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

abtris commented 8 years ago

@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 commented 8 years ago

@pksunkara commented

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