Skip to content

Commit

Permalink
Merge pull request #7 from yacir/yassir.perpare_0.2.0
Browse files Browse the repository at this point in the history
prepare 0.2.0
  • Loading branch information
yacir authored Jun 16, 2017
2 parents 7535da2 + 81a6c14 commit 95a9b6f
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 16 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 0.2.0 (2017-06-16)

* Added the custom tab label option
* Fixed the missing `active` class of the first tab
* Fixed the missing `string` import

## 0.1.0 (2017-03-01)

* Initial release
* Initial release
52 changes: 39 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,59 @@

[pypi-image]: https://img.shields.io/pypi/v/markdown-fenced-code-tabs.svg
[pypi-link]: https://pypi.python.org/pypi/markdown-fenced-code-tabs

# Markdown Code Tabs Extension

Generates Bootstrap HTML Tabs for Consecutive Markdown Fenced Code Blocks

```md
## Tabs
```http
GET / HTTP/1.1
User-Agent: MyClient/1.0.0
Accept: application/vnd.travis-ci.2+json
Host: api.travis-ci.org

HTTP/1.1 200 OK
Content-Type: application/json

```curl
$ curl -O wget http://example.com/pk.zip
{"hello":"world"}
```

```wget
$ wget http://example.com/pk.zip
```shell
$ travis raw /
{"hello":"world"}
```

## Single block
```ruby
require 'travis'

```
$ ls -lisa
# You usually don't want to fire API requests manually
client = Travis::Client.new
client.get_raw('/') # => {"hello"=>"world"}

client.get('/repos/sinatra/sinatra')
# => {"repo"=>#<Travis::Client::Repository: sinatra/sinatra>}
```
```

Becomes:
Becomes:

![Generated result](docs/images/img1.png)

To customize the tab label, add the `fct_label` option to your code block.

```md
```swift fct_label="Swift 2"
array.enumerate()
```

```swift fct_label="Swift 3"
array.enumerated()
```
```

![Generated result](docs/images/img2.png)

## Installation

Install the latest version with `pip`:
Expand All @@ -51,11 +77,11 @@ If `True`, the extension will render a single code block as a tab. Default is `F

`single_block_as_tab: True` generates:

![True single_block_as_tab](docs/images/img2.png)
![True single_block_as_tab](docs/images/img3.png)

`single_block_as_tab: False` generates:

![False single_block_as_tab](docs/images/img3.png)
![False single_block_as_tab](docs/images/img4.png)

## License

Expand All @@ -67,4 +93,4 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Binary file modified docs/images/img1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/img2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/img3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/img4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name='markdown-fenced-code-tabs',
version='0.1.0',
version='0.2.0',
url='https://github.com/yacir/markdown-fenced-code-tabs',
py_modules=['markdown_fenced_code_tabs'],
install_requires = ['markdown>=2.6'],
Expand All @@ -22,4 +22,4 @@
'Programming Language :: Python :: 3',
'Topic :: Text Processing'
]
)
)

0 comments on commit 95a9b6f

Please sign in to comment.