Skip to content

Slate template broken #338

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
terry90 opened this issue Apr 27, 2017 · 4 comments
Closed

Slate template broken #338

terry90 opened this issue Apr 27, 2017 · 4 comments

Comments

@terry90
Copy link
Contributor

terry90 commented Apr 27, 2017

Hey,

I just ran into an issue with the current Slate version.
The template for Slate generates some blocks like this:

### Request

#### Endpoint
```
GET /v1/app_configs
Authorization: Token token=qyKRKqDwtFs7QgUNjNgo
Accept: application/json
```

or

### Response

```
Content-Type: application/json; charset=utf-8
200 OK
```

The problem is, no lang is specified for these blocks, Slate tries to interpret them but throws this:

NoMethodError at /
undefined method `split' for nil:NilClass

Ruby	/home/xxx/xx/lib/multilang.rb: in block_code, line 3
Web	GET localhost/

When I edit my Markdown file and replace ``` by ```plaintext it stops crashing.

@scottweinert
Copy link

I'm experiencing the same issue. I'm not sure how to stop it from crashing though

@oestrich
Copy link
Contributor

Happy to accept a PR if you can fix the template or whatever else is wrong with it. I don't use Slate so I can't help much.

@terry90
Copy link
Contributor Author

terry90 commented May 18, 2017

@sweinertjr You can simply edit the generated file to add plaintext next to the declaration of code block.
E.g:

### Response

```
Content-Type: application/json; charset=utf-8
200 OK
```

Becomes:

### Response

```plaintext
Content-Type: application/json; charset=utf-8
200 OK
```

terry90 added a commit to terry90/rspec_api_documentation that referenced this issue Jun 6, 2017
@terry90
Copy link
Contributor Author

terry90 commented Jun 6, 2017

Fixed with PR #346

@terry90 terry90 closed this as completed Jun 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants