aboutsummaryrefslogtreecommitdiff
path: root/document_attribute.go
diff options
context:
space:
mode:
Diffstat (limited to 'document_attribute.go')
-rw-r--r--document_attribute.go37
1 files changed, 0 insertions, 37 deletions
diff --git a/document_attribute.go b/document_attribute.go
index ec86de1..c9f8374 100644
--- a/document_attribute.go
+++ b/document_attribute.go
@@ -3,12 +3,6 @@
package asciidoctor
-import (
- "fmt"
- "strconv"
- "strings"
-)
-
// List of document attribute.
const (
DocAttrAuthor = `author` // May contain the first author full name only.
@@ -81,34 +75,3 @@ func newDocumentAttribute() DocumentAttribute {
},
}
}
-
-func (docAttr *DocumentAttribute) apply(key, val string) (err error) {
- if key[0] == '!' {
- key = strings.TrimSpace(key[1:])
- delete(docAttr.Entry, key)
- return nil
- }
- var n = len(key)
- if key[n-1] == '!' {
- key = strings.TrimSpace(key[:n-1])
- delete(docAttr.Entry, key)
- return nil
- }
-
- if key == docAttrLevelOffset {
- var offset int64
- offset, err = strconv.ParseInt(val, 10, 32)
- if err != nil {
- return fmt.Errorf(`DocumentAttribute: %s: invalid value %q`, key, val)
- }
- if val[0] == '+' || val[0] == '-' {
- docAttr.LevelOffset += int(offset)
- goto valid
- }
- docAttr.LevelOffset = int(offset)
- }
-
-valid:
- docAttr.Entry[key] = val
- return nil
-}