mirror of
https://github.com/discourse/discourse.git
synced 2025-02-07 20:08:26 +00:00
DEV: Fix lint.
This commit is contained in:
parent
e60c74d3c1
commit
e2fc05705f
@ -4,15 +4,15 @@ import { emojiUnescape } from "discourse/lib/text";
|
|||||||
import { isRTL } from "discourse/lib/text-direction";
|
import { isRTL } from "discourse/lib/text-direction";
|
||||||
|
|
||||||
export function fancyTitle(title, supportMixedTextDirection) {
|
export function fancyTitle(title, supportMixedTextDirection) {
|
||||||
let fancyTitle = censor(
|
let title = censor(
|
||||||
emojiUnescape(title) || "",
|
emojiUnescape(title) || "",
|
||||||
Site.currentProp("censored_regexp")
|
Site.currentProp("censored_regexp")
|
||||||
);
|
);
|
||||||
|
|
||||||
if (supportMixedTextDirection) {
|
if (supportMixedTextDirection) {
|
||||||
const titleDir = isRTL(title) ? "rtl" : "ltr";
|
const titleDir = isRTL(title) ? "rtl" : "ltr";
|
||||||
return `<span dir="${titleDir}">${fancyTitle}</span>`;
|
return `<span dir="${titleDir}">${title}</span>`;
|
||||||
}
|
}
|
||||||
|
|
||||||
return fancyTitle;
|
return title;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user