# MAStalk [![Build Status](https://travis-ci.org/moneyadviceservice/mastalk.svg)](https://travis-ci.org/moneyadviceservice/mastalk) The Money Advice Service's Markdown extension language. ## Usage ``` gem install mastalk ``` ``` Mastalk::Document.new("markdown").to_html ``` ## Components ### Add Action `.add-action` box ``` ^[Help to Buy schemes FAQs](/en/articles/help-to-buy-schemes-faqs)^ ``` Outputs: ```

Help to Buy schemes FAQs

``` ### Callout `.callout` ``` $~callout # Budgeting tips In 1985, average first-time buyers needed a deposit of 5% to buy a home - in 2012, this had increased to 20% *Source: HMS Treasury* ~$ ``` Outputs: ```

Budgeting tips

In 1985, average first-time buyers needed a deposit of 5% to buy a home - in 2012, this had increased to 20%
Source: HM Treasury

``` ### Collapsible header ``` $= # Before you borrow =$ $- Find out if you need to borrow money and whether you can afford it. Learn how to work out the true cost of borrowing. Taking control of debt Where to get free debt advice, how to speak to the people you owe money to, and tips to help you pay back your debts in the right order. -$ ``` Outputs: ```

Find out if you need to borrow money and whether you can afford it. Learn how to work out the true cost of borrowing.

Taking control of debt

Where to get free debt advice, how to speak to the people you owe money to, and tips to help you pay back your debts in the right order.

``` ### Ticks ``` $yes-no [y] You should do this [/y] [y] and then do this [/y] [y] and finally this [/y] [n] You should not do this [/n] [n] or this [/n] [n] and definitely not do this [/n] $end ``` Outputs: ``` ``` ### Bullets (inside tables) ``` $bullet [%] You should do this [/%] [%] and then do this [/%] [%] and finally this [/%] $point ``` Outputs: ``` ``` ### Video `.video-wrapper` Embedding a YouTube video: ``` $~youtube_video 5n1nixLSrQI ~$ ``` Outputs: ``` ``` Or with a custom title: ``` $~youtube_video 5n1nixLSrQI The title of this video ~$ ``` Outputs: ``` ``` Alternatively there is also this legacy format (just here for backward compatibility): ``` ({5n1nixLSrQI}) ``` Outputs: ``` ``` Embedding a Brightcove video: ``` $~brightcove_video 3739688349001 ~$ ``` Outputs: ``` ``` Or with a custom title: ``` $~brightcove_video 3739688349001 The title of this video ~$ ``` Outputs: ``` ``` Embedding a Vimeo video: ``` $~vimeo_video 146226360 ~$ ``` Outputs: ``` ``` Or with a custom title: ``` $~vimeo_video 146226360 The title of this video ~$ ``` Outputs: ``` ``` ### Action Item `.action-item` ``` $action ## Header $collapsable $why ### Why? Your 'Cash ISA allowance $why $how ### How? If you already have an ISA $how $collapsable $item ``` Outputs: ```

Why?

Your ‘Cash ISA allowance

How?

If you already have an ISA

``` ### Line break ``` @~ ``` Outputs: ```
``` ### Block Creates a simple two column layout with content `$bl_c` on one side and `$bl_m` opposite. * `$bl_c` is intended to contain content of any type. * `$bl_m` is intended to contain images, i.e. `![Alt text](img.gif)`, or video, i.e. `({5n1nixLSrQI})` or `(@3739688349001@)`. ``` $bl $bl_c bl_c$ $bl_m bl_m$ bl$ ``` Outputs: ```
``` `$bl_c` `$bl_m` positioning can be swapped around to switch element positions.