Use a common set of tag prefixes for munges

All munges now start with `<!-- BEGIN MUNGE:` and end with `<!-- END MUNGE:`.
This lets me (in a followup) filter them better to normalize contents during
verification of generated docs.
This commit is contained in:
Tim Hockin
2015-07-10 21:50:56 -07:00
parent 8fceb754d8
commit ad8f8731b6
5 changed files with 36 additions and 13 deletions

View File

@@ -98,3 +98,15 @@ func hasMacroBlock(lines []string, begin string, end string) bool {
}
return false
}
// Returns the canonical begin-tag for a given description. This does not
// include the trailing newline.
func beginMungeTag(desc string) string {
return fmt.Sprintf("<!-- BEGIN MUNGE: %s -->", desc)
}
// Returns the canonical end-tag for a given description. This does not
// include the trailing newline.
func endMungeTag(desc string) string {
return fmt.Sprintf("<!-- END MUNGE: %s -->", desc)
}