Skip to content
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

Language tabs change bash to cURL visually #14

Open
upwebdesign opened this issue Feb 17, 2019 · 1 comment
Open

Language tabs change bash to cURL visually #14

upwebdesign opened this issue Feb 17, 2019 · 1 comment

Comments

@upwebdesign
Copy link

According to the documentarian documentation for language tabs, I should be able to do something like this in my index.md file:

language_tabs:
  - shell: cURL
  - php
  - php: SDK

However, when running, php artisan apidoc:generate, I get:

In helpers.php line 564:
                                                                                                                                                                            
  htmlspecialchars() expects parameter 1 to be string, array given (View: /home/project/vendor/mpociot/documentarian/resources/views/index.blade.php)

Here is the reference back to my original issue for laravel-apidoc-generator: mpociot/laravel-apidoc-generator#459 (comment)

@upwebdesign
Copy link
Author

@mpociot Im wondering if we could do something like this in the resources/views/index.blade.php file:

@if(is_array($lang))
  <a href="#" data-language-name="{{key($lang)}}:{{array_values($lang)[0]}}">
    {{array_values($lang)[0]}}
  </a>
@else
  <a href="#" data-language-name="{{$lang}}">{{$lang}}</a>
@endif

Doing this will mess with the JavaScript that is written for the tabs, of which I did not look at as of yet.

Thoughts?

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

1 participant