|
|
@ -68,6 +68,7 @@ func PreviewTemp(autoCode model.AutoCodeStruct) (map[string]string, error) { |
|
|
|
} |
|
|
|
builder := strings.Builder{} |
|
|
|
builder.WriteString("```") |
|
|
|
|
|
|
|
if ext != "" && strings.Contains(ext, ".") { |
|
|
|
builder.WriteString(strings.Replace(ext, ".", "", -1)) |
|
|
|
} |
|
|
@ -79,7 +80,7 @@ func PreviewTemp(autoCode model.AutoCodeStruct) (map[string]string, error) { |
|
|
|
builder.Write(data) |
|
|
|
builder.WriteString("\n\n```") |
|
|
|
|
|
|
|
pathArr := strings.Split(value.autoCodePath,"\\") |
|
|
|
pathArr := strings.Split(value.autoCodePath, "\\") |
|
|
|
ret[pathArr[1]+"-"+pathArr[3]] = builder.String() |
|
|
|
_ = f.Close() |
|
|
|
|
|
|
|