4
5
6
7
8
9
10
11
12
13
14
15
|
# File 'lib/nexmo_markdown_renderer/filters/tooltip_filter.rb', line 4
def call(input)
input.gsub(/\^\[([\p{Han}a-zA-Z0-9\s:\-]+)\]\((.+?)\)/) do
tooltip = " <span class=\"Vlt-tooltip Vlt-tooltip--top\" title=\"\#{$2}\" tabindex=\"0\">\n \#{$1} \n <svg class=\"Vlt-icon Vlt-icon--smaller Vlt-icon--text-bottom Vlt-blue\" aria-hidden=\"true\"><use xlink:href=\"/symbol/volta-icons.svg#Vlt-icon-help-negative\"/></svg>\n </span>\n HEREDOC\n \n \"FREEZESTART\#{Base64.urlsafe_encode64(tooltip)}FREEZEEND\"\n end\nend\n"
|