File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -35,10 +35,11 @@ dbg "{tangledExt}"
3535
3636type
3737 HeaderArgType = enum
38- haPropertyKwd
39- haPropertyDrawer
40- haBeginSrc
41- haNone
38+ haPropertyKwd # #+property: header-args ..
39+ haPropertyDrawer # :header-args: ..
40+ haPropertyDrawerAppend # :header-args+: ..
41+ haBeginSrc # #+begin_src foo ..
42+ haNone # none of the above
4243 UserError = object of Exception
4344 OrgError = object of Exception
4445 HeaderArgs = object
@@ -373,9 +374,13 @@ proc getHeaderArgs(s: string): LangAndArgs =
373374 headerArgsRaw = spaceSepParts[1 .. spaceSepParts.high]
374375 let
375376 kwdParts = spaceSepParts[0 ].split (" :" )
377+ doAssert kwdParts.len >= 3
376378 if kwdParts.len == 4 :
377379 lang = kwdParts[2 ].strip (chars = {' ' , '+' })
378- haType = haPropertyDrawer
380+ if kwdParts[1 ].strip ().endsWith (" +" ):
381+ haType = haPropertyDrawerAppend
382+ else :
383+ haType = haPropertyDrawer
379384 elif spaceSepParts.len >= 2 and
380385 spaceSepParts[0 ].toLowerAscii () == " #+begin_src" :
381386 if spaceSepParts.len >= 3 :
You can’t perform that action at this time.
0 commit comments