mirror of
https://github.com/discourse/discourse.git
synced 2025-02-06 15:18:46 +08:00
7 lines
237 B
JavaScript
7 lines
237 B
JavaScript
import { htmlHelper } from 'discourse-common/lib/helpers';
|
|
|
|
export default htmlHelper(function(str) {
|
|
if (Ember.isEmpty(str)) { return ""; }
|
|
return (str.indexOf('fa-') === 0) ? `<i class='fa ${str}'></i>` : `<img src='${str}'>`;
|
|
});
|