Logo: Relish

  1. Sign in

Project: Koios

Link

Write links in markdown, with or without a content. If not, the url is duplicated as content.

You can create a link by extending a string like:

'https://github.com'.link_to 'Github'

Or by calling the a function:

a 'https://github.com', 'Github'
Scenarios
When
I execute the following koios code:
Koios::Doc.write {[
  'https://github.com'.link_to
]}
Then
the markdown output is:
[https://github.com](https://github.com)
When
I execute the following koios code:
Koios::Doc.write {[
  'https://github.com'.link_to('Github')
]}
Then
the markdown output is:
[Github](https://github.com)
When
I execute the following koios code:
Koios::Doc.write {[
  a('https://github.com')
]}
Then
the markdown output is:
[https://github.com](https://github.com)
When
I execute the following koios code:
Koios::Doc.write {[
  a('https://github.com', 'Github')
]}
Then
the markdown output is:
[Github](https://github.com)
When
I execute the following koios code:
Koios::Doc.write{[
  'https://travis-ci.org/eunomie.koios'.link_to(
    'https://travis-ci.org/eunomie/koios.svg?branch=master'.img('Build Status'))
]}
Then
the markdown output is:
[![Build Status](https://travis-ci.org/eunomie/koios.svg?branch=master)](https://travis-ci.org/eunomie.koios)

Last published over 4 years ago by eunomie.