This commit is contained in:
2020-03-02 18:47:04 +01:00
committed by smuddy
parent 5b746e0db5
commit ccd91aa81c
93 changed files with 444 additions and 89 deletions

View File

@@ -0,0 +1,45 @@
import {Injectable} from '@angular/core';
export enum SectionType {
Verse,
Chorus,
Bridge,
}
export enum LineType {
title,
chrod,
text,
}
export interface Line {
type: LineType;
text: string;
}
export interface Section {
type: SectionType;
number: number;
lines: Line[];
}
@Injectable({
providedIn: 'root'
})
export class TextRenderingService {
constructor() {
}
public render(text: string): Section[] {
const lines = text.match(/[^\r\n]+/g);
}
private findSection(line: string) {
}
}