diff --git a/org/drawer.go b/org/drawer.go index eee590d..5576302 100644 --- a/org/drawer.go +++ b/org/drawer.go @@ -15,7 +15,7 @@ type PropertyDrawer struct { } var beginDrawerRegexp = regexp.MustCompile(`^(\s*):(\S+):\s*$`) -var endDrawerRegexp = regexp.MustCompile(`^(\s*):END:\s*$`) +var endDrawerRegexp = regexp.MustCompile(`(?i)^(\s*):END:\s*$`) var propertyRegexp = regexp.MustCompile(`^(\s*):(\S+):(\s+(.*)$|$)`) func lexDrawer(line string) (token, bool) { diff --git a/org/testdata/headlines.org b/org/testdata/headlines.org index 17c08e3..ee02735 100644 --- a/org/testdata/headlines.org +++ b/org/testdata/headlines.org @@ -18,7 +18,7 @@ we can link to headlines that define a custom_id: [[#this-will-be-the-id-of-the- Still outside the drawer :DRAWERNAME: This is inside the drawer -:END: +:end: Still outside the drawer * CUSTOM headline with custom status it's possible to use =#+SETUPFILE= - in this case the setup file contains the following diff --git a/org/testdata/misc.html b/org/testdata/misc.html index 6f84275..f5cc21a 100644 --- a/org/testdata/misc.html +++ b/org/testdata/misc.html @@ -162,7 +162,7 @@ we can link to headlines that define a custom_id: [[#this-will-be-the-id-of-the- Still outside the drawer :DRAWERNAME: This is inside the drawer -:END: +:end: Still outside the drawer * CUSTOM headline with custom status it's possible to use =#+SETUPFILE= - in this case the setup file contains the following