From 5dd95153bb88ef55da8d95927e344c9220a1e510 Mon Sep 17 00:00:00 2001 From: smuddyx Date: Mon, 16 Mar 2020 21:10:06 +0100 Subject: [PATCH] typo --- .../songs/services/text-rendering.service.spec.ts | 10 +++++----- .../modules/songs/services/text-rendering.service.ts | 5 ++--- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/app/modules/songs/services/text-rendering.service.spec.ts b/src/app/modules/songs/services/text-rendering.service.spec.ts index 754eda0..7f252fe 100644 --- a/src/app/modules/songs/services/text-rendering.service.spec.ts +++ b/src/app/modules/songs/services/text-rendering.service.spec.ts @@ -60,15 +60,15 @@ Cool bridge without any chords it('should parse chord lines', () => { const service: TextRenderingService = TestBed.get(TextRenderingService); const sections = service.parse(testText); - expect(sections[0].lines[0].type).toBe(LineType.chrod); + expect(sections[0].lines[0].type).toBe(LineType.chord); expect(sections[0].lines[0].text).toBe('C D E F G A H'); - expect(sections[0].lines[2].type).toBe(LineType.chrod); + expect(sections[0].lines[2].type).toBe(LineType.chord); expect(sections[0].lines[2].text).toBe(' a d e f g a h c b'); - expect(sections[1].lines[0].type).toBe(LineType.chrod); + expect(sections[1].lines[0].type).toBe(LineType.chord); expect(sections[1].lines[0].text).toBe('C D E F G A H'); - expect(sections[1].lines[2].type).toBe(LineType.chrod); + expect(sections[1].lines[2].type).toBe(LineType.chord); expect(sections[1].lines[2].text).toBe(' a d e f g a h c b'); - expect(sections[2].lines[0].type).toBe(LineType.chrod); + expect(sections[2].lines[0].type).toBe(LineType.chord); expect(sections[2].lines[0].text).toBe('c# cb c7 cmaj7 c/e'); }); }); diff --git a/src/app/modules/songs/services/text-rendering.service.ts b/src/app/modules/songs/services/text-rendering.service.ts index 73a02b2..1b9cd25 100644 --- a/src/app/modules/songs/services/text-rendering.service.ts +++ b/src/app/modules/songs/services/text-rendering.service.ts @@ -7,8 +7,7 @@ export enum SectionType { } export enum LineType { - title, - chrod, + chord, text, } @@ -49,7 +48,7 @@ export class TextRenderingService { private getLineOfLineText(text: string): Line { const matches = !!text.match(this.regexChords); - const type = matches ? LineType.chrod : LineType.text; + const type = matches ? LineType.chord : LineType.text; return {type, text} }