Skip to content

Commit

Permalink
Merge cff086a into a519845
Browse files Browse the repository at this point in the history
  • Loading branch information
hennevogel committed Feb 11, 2020
2 parents a519845 + cff086a commit 1c09be7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/markdown_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class MarkdownController < ApplicationController
respond_to :js

def preview
markdown_source = params[:source].to_str.gsub(/:([\w+-]+):/) do |match|
markdown_source = params[:source].to_str.gsub(/ :([\w+-]+): /) do |match|
%(![add-emoji](https://github.githubassets.com/images/icons/emoji/#{match.to_str.tr(':','')}.png))
end if params[:source]
@rendered = MarkdownHelper.render markdown_source
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def active_page_size(page_size, param=nil)
end

def emojify content
content.to_str.gsub(/:([\w+-]+):/) do |match|
content.to_str.gsub(/ :([\w+-]+): /) do |match|
%(![add-emoji](https://github.githubassets.com/images/icons/emoji/#{match.to_str.tr(':','')}.png))
end.html_safe if content.present?
end
Expand Down

0 comments on commit 1c09be7

Please sign in to comment.