sonic-pi

https://github.com/sonic-pi-net/sonic-pi

C++

Code. Music. Live.

Kramdown::Converter::Base.convert

Convert the element tree +tree+ and return the resulting conversion object (normally a
string) and an array with warning messages. The parameter +options+ specifies the conversion
options that should be used.

Initializes a new instance of the calling class and then calls the #convert method with
+tree+ as parameter.

If the +template+ option is specified and non-empty, the template is evaluate with ERB
before and/or after the tree conversion depending on the result of #apply_template_before?
and #apply_template_after?. If the template is evaluated before, an empty string is used for
the body; if evaluated after, the result is used as body. See ::apply_template.

The template resolution is done in the following way (for the converter ConverterName):

1. Look in the current working directory for the template.

2. Append +.converter_name+ (e.g. +.html+) to the template name and look for the resulting
   file in the current working directory (the form +.convertername+ is deprecated).

3. Append +.converter_name+ to the template name and look for it in the kramdown data
   directory (the form +.convertername+ is deprecated).

4. Check if the template name starts with 'string://' and if so, strip this prefix away and
   use the rest as template.

Source | Google | Stack overflow

Edit

git clone [email protected]:sonic-pi-net/sonic-pi.git

cd sonic-pi

open app/server/ruby/vendor/kramdown-2.1.0/lib/kramdown/converter/base.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Kramdown--Converter--Base-convert-for-pr


# Commit to git

git add app/server/ruby/vendor/kramdown-2.1.0/lib/kramdown/converter/base.rbgit commit -m "better docs for Kramdown::Converter::Base.convert"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Kramdown--Converter--Base-convert-for-pr

hub pull-request


# Celebrate!