diff --git a/output/md/md.go b/output/md/md.go index c4a254893..3d5b09ce8 100644 --- a/output/md/md.go +++ b/output/md/md.go @@ -538,6 +538,7 @@ func (m *Md) makeTableTemplateData(t *schema.Table) map[string]interface{} { number := m.config.Format.Number adjust := m.config.Format.Adjust hideColumns := m.config.Format.HideColumnsWithoutValues + showOnlyFirstParagraph := m.config.Format.ShowOnlyFirstParagraph // Columns columnsData := [][]string{} @@ -603,9 +604,13 @@ func (m *Md) makeTableTemplateData(t *schema.Table) map[string]interface{} { } for _, v := range t.Viewpoints { + desc := v.Desc + if showOnlyFirstParagraph { + desc = output.ShowOnlyFirstParagraph(desc) + } data := []string{ fmt.Sprintf("[%s](viewpoint-%d.md)", v.Name, v.Index), - v.Desc, + desc, } viewpointsData = append(viewpointsData, data) diff --git a/testdata/md_test_a.md.first_para.golden b/testdata/md_test_a.md.first_para.golden index 2abb701ce..a680945b7 100644 --- a/testdata/md_test_a.md.first_para.golden +++ b/testdata/md_test_a.md.first_para.golden @@ -20,7 +20,7 @@ TABLE A | Name | Definition | | ---- | ---------- | | [table a b](viewpoint-0.md) | select table a and b | -| [table a label red](viewpoint-3.md) | select table a and label red

- table a
- label red | +| [table a label red](viewpoint-3.md) | select table a and label red | ## Constraints