isFontValid returns whether or not the submitted post's appearance is valid.
()
| 1361 | |
| 1362 | // isFontValid returns whether or not the submitted post's appearance is valid. |
| 1363 | func (p *SubmittedPost) isFontValid() bool { |
| 1364 | validFonts := map[string]bool{ |
| 1365 | "norm": true, |
| 1366 | "sans": true, |
| 1367 | "mono": true, |
| 1368 | "wrap": true, |
| 1369 | "code": true, |
| 1370 | } |
| 1371 | |
| 1372 | _, valid := validFonts[p.Font] |
| 1373 | return valid |
| 1374 | } |
| 1375 | |
| 1376 | func getRawPost(app *App, friendlyID string) *RawPost { |
| 1377 | var content, font, title string |
no outgoing calls
no test coverage detected