]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/shared-main/misc/help.component.ts
Merge remote-tracking branch 'weblate/develop' into develop
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-main / misc / help.component.ts
index 9647e05bdfd6aef7c4ea1bb2e6c3d48004e1de33..37e2abd97b8b7026a28fdf41dbbc2e2ddb10e102 100644 (file)
@@ -1,6 +1,6 @@
 import { AfterContentInit, Component, ContentChildren, Input, OnChanges, OnInit, QueryList, TemplateRef } from '@angular/core'
-import { MarkdownService } from '@app/core'
 import { GlobalIconName } from '@app/shared/shared-icons'
+import { ENHANCED_RULES, TEXT_RULES } from '@shared/core-utils/renderer/markdown'
 import { PeerTubeTemplateDirective } from '../angular'
 
 @Component({
@@ -60,29 +60,29 @@ export class HelpComponent implements OnInit, OnChanges, AfterContentInit {
 
   private init () {
     if (this.helpType === 'markdownText') {
-      this.mainHtml = this.formatMarkdownSupport(MarkdownService.TEXT_RULES)
+      this.mainHtml = this.formatMarkdownSupport(TEXT_RULES)
       return
     }
 
     if (this.helpType === 'markdownEnhanced') {
-      this.mainHtml = this.formatMarkdownSupport(MarkdownService.ENHANCED_RULES)
+      this.mainHtml = this.formatMarkdownSupport(ENHANCED_RULES)
       return
     }
   }
 
   private formatMarkdownSupport (rules: string[]) {
-    // tslint:disable:max-line-length
+    /* eslint-disable max-len */
     return $localize`<a href="https://en.wikipedia.org/wiki/Markdown#Example" target="_blank" rel="noopener noreferrer">Markdown</a> compatible that supports:` +
       this.createMarkdownList(rules)
   }
 
   private createMarkdownList (rules: string[]) {
     const rulesToText = {
-      'emphasis': $localize`Emphasis`,
-      'link': $localize`Links`,
-      'newline': $localize`New lines`,
-      'list': $localize`Lists`,
-      'image': $localize`Images`
+      emphasis: $localize`Emphasis`,
+      link: $localize`Links`,
+      newline: $localize`New lines`,
+      list: $localize`Lists`,
+      image: $localize`Images`
     }
 
     const bullets = rules.map(r => rulesToText[r])