summaryrefslogtreecommitdiff
path: root/src/web/app/common/scripts/text-compiler.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-11-23 05:43:00 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-11-23 05:43:00 +0900
commit3f8ebac466ece8e9598432f3f574ec44e420c03b (patch)
tree05114fce9728d6ce1deecc1f2eb8a903a22b0100 /src/web/app/common/scripts/text-compiler.ts
parent:v: (diff)
downloadmisskey-3f8ebac466ece8e9598432f3f574ec44e420c03b.tar.gz
misskey-3f8ebac466ece8e9598432f3f574ec44e420c03b.tar.bz2
misskey-3f8ebac466ece8e9598432f3f574ec44e420c03b.zip
なんかもうめっちゃ変えた
Closes #940
Diffstat (limited to 'src/web/app/common/scripts/text-compiler.ts')
-rw-r--r--src/web/app/common/scripts/text-compiler.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/web/app/common/scripts/text-compiler.ts b/src/web/app/common/scripts/text-compiler.ts
index 8c65d6a068..e0ea47df26 100644
--- a/src/web/app/common/scripts/text-compiler.ts
+++ b/src/web/app/common/scripts/text-compiler.ts
@@ -1,6 +1,7 @@
+declare const _URL_: string;
+
import * as riot from 'riot';
import * as pictograph from 'pictograph';
-import CONFIG from './config';
const escape = text =>
text
@@ -26,7 +27,7 @@ export default (tokens, shouldBreak) => {
case 'link':
return `<a class="link" href="${escape(token.url)}" target="_blank" title="${escape(token.url)}">${escape(token.title)}</a>`;
case 'mention':
- return `<a href="${CONFIG.url + '/' + escape(token.username)}" target="_blank" data-user-preview="${token.content}" ${me && me.username == token.username ? 'data-is-me' : ''}>${token.content}</a>`;
+ return `<a href="${_URL_ + '/' + escape(token.username)}" target="_blank" data-user-preview="${token.content}" ${me && me.username == token.username ? 'data-is-me' : ''}>${token.content}</a>`;
case 'hashtag': // TODO
return `<a>${escape(token.content)}</a>`;
case 'code':