Skip to content
This repository has been archived by the owner on Oct 1, 2018. It is now read-only.

Support tabs and CRLF line endings #29

Closed
zdne opened this issue Aug 30, 2013 · 24 comments
Closed

Support tabs and CRLF line endings #29

zdne opened this issue Aug 30, 2013 · 24 comments

Comments

@zdne
Copy link
Contributor

zdne commented Aug 30, 2013

No description provided.

@netmilk
Copy link

netmilk commented Oct 24, 2013

+1
Apiary users are often facing this issue:

message: Cannot parse blueprint code 
description: The use of tab(s) '\\t' in source data isn't currently 
supported, please contact makers 
code: 2

@zzen
Copy link

zzen commented Nov 2, 2013

+1

@zdne
Copy link
Contributor Author

zdne commented Nov 13, 2013

To fix this issues a moderate modification to https://github.com/apiaryio/sundown is needed.

Consider using Hoedown contributing to hoedown/hoedown#22 and hoedown/hoedown#28 instead

@pksunkara
Copy link
Contributor

Can we make a hack for this by expanding all \t before parsing?

@zdne
Copy link
Contributor Author

zdne commented Sep 26, 2014

This won't not help as then you would need to recalculate the source maps (in order to display any possible warning / errors). Doing so (recalculating) is the core problem here and solving it would bring the solution for this issue (and thus it wouldn't be a hack)

@vitawasalreadytaken
Copy link

+1 for tabs! Any ETA on this?

@zdne
Copy link
Contributor Author

zdne commented Apr 27, 2015

@ze-phyr-us so far there wasn't too much of push on this one (read no concrete plans yet). Introducing this will most likely mean migration to Hoedown or CommonMark parser.

@stephnr
Copy link

stephnr commented Jan 13, 2016

Pinging for update @zdne

@zdne
Copy link
Contributor Author

zdne commented Jan 14, 2016

Hey @Stephn-R,
you are the first one to ask for this in a long time. I am afraid the status hasn't changed since #29 (comment) we might migrate the parser but no ETA just yet.

@stephnr
Copy link

stephnr commented Jan 14, 2016

So lets rise this baby back from the dead 💀 ⚡

@jacquesfu
Copy link

So what's a workaround? I have codeblocks with tabs to show examples... will the codeblocks have to be converted to spaces I guess?

@vitawasalreadytaken
Copy link

@jacquesfu I'm just piping my blueprints through sed 's/ / /g' before feeding them to snowcrash.

Edit: GH screws up the formatting, but obviously that was s/<tab>/<4 spaces>/g

@zdne
Copy link
Contributor Author

zdne commented Jan 26, 2016

Hey guys, may I just ask you where you need the tabs? Is it the mock server or testing? I presume it is really about the content of payloads and not necessarily the blueprint itself, correct?

@stephnr
Copy link

stephnr commented Jan 26, 2016

Alright so the way I was able to resolve this was if I targeted the affected files and ran a python method for stripping out carriage returns >> \r

@vitawasalreadytaken
Copy link

@zdne Coding standards. When the entire project uses tabs rather than spaces, I want my documentation consistent with that.

@stephnr
Copy link

stephnr commented Jan 27, 2016

Agreed but this discussion is about the way line endings are formed by your IDE/System

@lippea
Copy link

lippea commented Mar 9, 2016

This is not big problem, but quite annoying.
We also have problem that I removed all \t \r, committed to git, but others still have problem with \r after downloading the code again.

@BigBlueHat
Copy link

I just hit this issue because Windows. 😖 It's obviously possible to route around, but it's an unfortunate complication when trying to use API Blueprint docs with dredd, etc.

Remove pain. Win hearts and minds. 😄

👍 to fixing this soon.

@tobeorla
Copy link

tobeorla commented Oct 6, 2016

I hope CRLF gets supported or converted when necessary

@jch254
Copy link

jch254 commented Nov 15, 2016

+1!!!

@honzajavorek
Copy link
Contributor

This is an important pre-requisite for apiaryio/dredd#204.

@vnenkpet
Copy link

vnenkpet commented Feb 1, 2017

+1

@lippea
Copy link

lippea commented Mar 27, 2017

It was annoying, but not blocking issue.
I ended up by replacing with notepad++ and check into github with .gitattributes:
*.apib text eol=lf

@abtris
Copy link
Contributor

abtris commented Oct 1, 2018

Migrated to apiaryio/drafter#652

@abtris abtris closed this as completed Oct 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests