-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat:refer viewpoints from tables #532
feat:refer viewpoints from tables #532
Conversation
@@ -129,6 +129,11 @@ func (m *Md) OutputViewpoint(wr io.Writer, i int, v *schema.Viewpoint) error { | |||
|
|||
// Output generate markdown files. | |||
func Output(s *schema.Schema, c *config.Config, force bool) (e error) { | |||
s, err := s.SetViewpointsToTables() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not quite sure if this is is appropriate to set viewpoints to table.
I could be better to be in config.Analyze but it can effect more files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's start with the minimum effect range.
I like refactoring 👍
@k1LoW |
Thank you!!!! Please! |
65ad9b7
to
32e89fc
Compare
32e89fc
to
adc687d
Compare
Lint is just passed now by adc687d |
@k1LoW |
Feel free to trial and error without worrying about it 👍 |
output/md/md.go
Outdated
for _, v := range t.Viewpoints { | ||
data := []string{ | ||
fmt.Sprintf("[%s](viewpoint-%d.md)", v.Name, v.Index), | ||
v.Desc, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to change the contents of the display using showOnlyFirstParagraph
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@k1LoW
Alright! I fixed it 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GREAT! Thank you!
fix: #526
based on discussion in #530.
To render link to viewpoints from the markdown, the OutputTable function has to know the index of the viewpoints, which was not included in Viewpoint type.
So I added TableViewpoint type like below.