Skip to content

Commit

Permalink
#36 Sectioが連番のTitleを持つように修正
Browse files Browse the repository at this point in the history
  • Loading branch information
TakenPt committed Apr 28, 2024
1 parent ee1ebad commit 935632c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Epub/KoeBook.Epub/Services/AiStoryAnalyzerService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ public partial class AiStoryAnalyzerService(ISplitBraceService splitBraceService

public EpubDocument CreateEpubDocument(AiStory aiStory, Guid id)
{
int sectionNumber = 1;
return new EpubDocument(aiStory.Title, "AI", "", id)
{
Chapters = [new Chapter()
{
Sections = aiStory.Sections.Select(s => new Section("")
Sections = aiStory.Sections.Select(s => new Section($"{sectionNumber++}")
{
Elements = s.Paragraphs.SelectMany(p =>
_splitBraceService.SplitBrace(p.GetText())
Expand Down

0 comments on commit 935632c

Please sign in to comment.