Closes #1401 "Follow-up from "WIP: GitLab 9.2 release post"
What
The code block below (def markdown s
) in custom_helpers.rb
, added by https://gitlab.com/gitlab-com/www-gitlab-com/commit/40f823985ede789930d7d4f7dfb723547059a7b4:
def markdown(text)
Tilt['markdown'].new { text }.render
end
def markdown s
Kramdown::Document.new(s).to_html
end
Enabled the ability to add markdown kramdown to Yaml data files, then pull them into Haml files with = markdown(foo.bar)
. With only the block def markdown(text)
, there wasn't a way to do this (ref https://gitlab.com/gitlab-com/www-gitlab-com/merge_requests/6084/diffs).
This helper is gonna be helpful for other pages; e.g., if we want we can enable to /comparison/*
:
From @rspeicher (https://gitlab.com/gitlab-com/www-gitlab-com/merge_requests/5551/diffs#note_30331287):
What? There's a helper directly above this one called
markdown
.(...)
You can just add another method with the same name. It's replacing the previous one, so now the old one's there for no reason.
I also don't understand what wasn't working with the old one -- I'll open an issue to address in another MR.
Let's figure out what we're gonna do about it ;)
cc/ @SeanPackham @axil