Comments (23)
+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
from drafter.
+1
from drafter.
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
from drafter.
Can we make a hack for this by expanding all \t
before parsing?
from drafter.
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)
from drafter.
@ze-phyr-us commented
+1 for tabs! Any ETA on this?
from drafter.
@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.
from drafter.
@defaltd commented
Pinging for update @zdne
from drafter.
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 apiaryio/snowcrash#29 (comment) we might migrate the parser but no ETA just yet.
from drafter.
@defaltd commented
So lets rise this baby back from the dead 💀 ⚡
from drafter.
So what's a workaround? I have codeblocks with tabs to show examples... will the codeblocks have to be converted to spaces I guess?
from drafter.
@ze-phyr-us commented
@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
from drafter.
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?
from drafter.
@defaltd commented
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
from drafter.
@ze-phyr-us commented
@zdne Coding standards. When the entire project uses tabs rather than spaces, I want my documentation consistent with that.
from drafter.
@defaltd commented
Agreed but this discussion is about the way line endings are formed by your IDE/System
from drafter.
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.
from drafter.
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.
from drafter.
I hope CRLF gets supported or converted when necessary
from drafter.
+1!!!
from drafter.
This is an important pre-requisite for apiaryio/dredd#204.
from drafter.
+1
from drafter.
It was annoying, but not blocking issue.
I ended up by replacing with notepad++ and check into github with .gitattributes:
*.apib text eol=lf
from drafter.
Related Issues (20)
- Missing resource name renders incorrect output but it is validated
- Confusing AST for enum examples HOT 4
- Compatibility with MSVC 2019 HOT 1
- Building drafter-cli causes a link "warning" (macOS)
- Duplicit value in enumeration HOT 2
- Missing description after wrongly interpreted MSON `enum[string], fixed`
- PEGTL not fixed to specific version HOT 1
- Drafter backend crashes on unexpanded `Include (object)` HOT 1
- sigsegv
- Include Drafter version in ABI HOT 2
- Parser emits that `false` is not allowed boolean type for default HOT 1
- Ninja can no longer build due to cycling input HOT 2
- Drafter version does not work for CMake builds
- Docker hub entry outdated HOT 1
- Distinct OneOf gets parsed as single OneOf group in schema HOT 5
- Fixed array with a mixin inside produces incorrect json schema
- Building drafter is painfully slow. HOT 3
- Drafter for Java
- Compile error with newer gcc
- [build] CMake build on RHEL 9 is missing libraries HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from drafter.