Skip to content

feat: define md.Content.Headings#258

Merged
k1LoW merged 2 commits intok1LoW:mainfrom
Songmu:sentinel-level
Jul 18, 2025
Merged

feat: define md.Content.Headings#258
k1LoW merged 2 commits intok1LoW:mainfrom
Songmu:sentinel-level

Conversation

@Songmu
Copy link
Collaborator

@Songmu Songmu commented Jul 15, 2025

We discussed this in #193 and #194, and I am considering withdrawing the pull request of #194. However, the heading level of the TITLE element in the slide is essential information for determining the layout, so I added it to the property of the Content.

This property itself does not have a particular impact at present, but it should be referenced when implementing the DSL to determine the layout.

The name TitleHeadingLevel may require further discussion.

@k1LoW
Copy link
Owner

k1LoW commented Jul 15, 2025

Thank you. I am gradually making progress on DSL as well.

I thought I would record a little more detail, as it seems that not only the heading level but also the number of headings at each level will be important (e.g, Headings: map[int]string{} ).
What do you think?

@Songmu
Copy link
Collaborator Author

Songmu commented Jul 16, 2025

Any data structure will fine, It is important that you find it easy to create DSL, so I would like to prioritize your preferences. So I will remake it in that form.

By the way, we could use [6]int or [7]int, but handling 0 is a bit tricky. However, it avoids the problem of random key iteration. It's difficult.

@k1LoW
Copy link
Owner

k1LoW commented Jul 16, 2025

map[int]string{} holds the most information. It uses the heading level as the key and stores the title string as the value.

@Songmu
Copy link
Collaborator Author

Songmu commented Jul 17, 2025

I see. So you want to enter the title string as is. That certainly provides the most information.

However, would it be okay to use map[int][]string instead of map[int]string for multiple headings at the same level?

Similarly, it might also be possible to use [6][]string.

@k1LoW
Copy link
Owner

k1LoW commented Jul 17, 2025

Oh, my mistake. You're right. It should be map[int][]string. Thank you!

@Songmu Songmu changed the title feat: define md.Content.TitleHeadingLevel feat: define md.Content.Headings Jul 18, 2025
@Songmu
Copy link
Collaborator Author

Songmu commented Jul 18, 2025

I added md.Content.Headings: map[int][]string. Please review it. @k1LoW

@k1LoW
Copy link
Owner

k1LoW commented Jul 18, 2025

It will be helpful!

@k1LoW k1LoW merged commit 7c2ac62 into k1LoW:main Jul 18, 2025
1 check passed
@github-actions github-actions bot mentioned this pull request Jul 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants