Make the Go compiler calculate renderer flags
This makes the Go compiler automatically calculate renderer flags bitmask values by putting 1 << iota as the first meaningful flag. This has a downside of having the first flag always meaning 2, and not 1, whereas WithMetadata already meaned 1, therefore this is a breaking change.
This commit is contained in:
parent
c872e012e2
commit
688d88d72b
1 changed files with 2 additions and 2 deletions
|
@ -67,10 +67,10 @@ func (s Settings) Has(setting Settings) bool {
|
|||
|
||||
const (
|
||||
// Defaults simply renders the document.
|
||||
Defaults Settings = 0b0
|
||||
Defaults Settings = 0
|
||||
// WithMetadata indicates that the metadata should be included in
|
||||
// the text produced by the renderer.
|
||||
WithMetadata Settings = 0b1
|
||||
WithMetadata Settings = 1 << iota
|
||||
)
|
||||
|
||||
// RenderMarkdown converts Markdown text to Gemtext using gomarkdown. It
|
||||
|
|
Loading…
Reference in a new issue