mirror of
https://github.com/discourse/discourse.git
synced 2025-09-08 12:06:51 +08:00
FEATURE: refactoring and better handling of special cases (#6666)
This commit is contained in:
parent
3453707784
commit
b0d08b5a8c
10 changed files with 605 additions and 295 deletions
|
@ -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 += ">"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue