Skip to content
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

Use code block for attribute name #59

Merged
merged 1 commit into from Mar 15, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions schemamd/render.go
Expand Up @@ -52,7 +52,7 @@ type nestedType struct {
func writeAttribute(w io.Writer, path []string, att *tfjson.SchemaAttribute, group groupFilter) ([]nestedType, error) {
name := path[len(path)-1]

_, err := io.WriteString(w, "- **"+name+"** ")
_, err := io.WriteString(w, "- `"+name+"` ")
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -112,7 +112,7 @@ func writeAttribute(w io.Writer, path []string, att *tfjson.SchemaAttribute, gro
func writeBlockType(w io.Writer, path []string, block *tfjson.SchemaBlockType) ([]nestedType, error) {
name := path[len(path)-1]

_, err := io.WriteString(w, "- **"+name+"** ")
_, err := io.WriteString(w, "- `"+name+"` ")
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -270,7 +270,7 @@ func writeNestedTypes(w io.Writer, nestedTypes []nestedType) error {
func writeObjectAttribute(w io.Writer, path []string, att cty.Type, group groupFilter) ([]nestedType, error) {
name := path[len(path)-1]

_, err := io.WriteString(w, "- **"+name+"** (")
_, err := io.WriteString(w, "- `"+name+"` (")
if err != nil {
return nil, err
}
Expand Down