mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 02:51:14 +08:00
FEATURE: refactoring and better handling of special cases (#6666)
This commit is contained in:
@ -1,9 +1,10 @@
|
||||
require 'rails_helper'
|
||||
|
||||
def generate_html(text, opts = {})
|
||||
output = "<p><span class=\"discourse-local-date\""
|
||||
output = "<p><span"
|
||||
output += " data-date=\"#{opts[:date]}\"" if opts[:date]
|
||||
output += " data-time=\"#{opts[:time]}\"" if opts[:time]
|
||||
output += " class=\"discourse-local-date\""
|
||||
output += " data-format=\"#{opts[:format]}\"" if opts[:format]
|
||||
output += " data-email-preview=\"#{opts[:email_preview]}\"" if opts[:email_preview]
|
||||
output += ">"
|
||||
|
Reference in New Issue
Block a user