Commit 7ba101a5 authored by Fabio Pelosin's avatar Fabio Pelosin

[Acknowledgements] Fine tune to markdown output.

Discussion at #250
Added white space to the titles and made header title h1
instead of an h2.
parent 59142307
......@@ -12,26 +12,26 @@ module Pod
file.close
end
def title_from_string(string)
def title_from_string(string, level)
if !string.empty?
"#{string}\n" + '-' * string.length + "\n"
"#" * level << " #{string}"
end
end
def string_for_pod(pod)
if (license_text = pod.license_text)
title_from_string(pod.name) + license_text + "\n"
"\n" << title_from_string(pod.name, 2) << "\n\n" << license_text << "\n"
end
end
def licenses
licenses_string = "#{title_from_string(header_title)}#{header_text}\n"
licenses_string = "#{title_from_string(header_title, 1)}\n#{header_text}\n"
@pods.each do |pod|
if (license = string_for_pod(pod))
licenses_string += license
end
end
licenses_string += "#{title_from_string(footnote_title)}#{footnote_text}\n"
licenses_string += "#{title_from_string(footnote_title, 2)}#{footnote_text}\n"
end
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment