Skip to content

Commit bfec63e

Browse files
committed
Enable basic parsing property drawers
The validity of the complete Org property drawer is not yet checked. Also the header-args are treated the same as header-args+ Update README
1 parent 394f84f commit bfec63e

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

README.org

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,17 @@ You do *not* need Emacs or Org mode installed to use ~ntangle~.
4646
See [[#development][Development]].
4747
* Features
4848
** Tangling /minus Noweb/ [7/8]
49-
- [X] Understand global tangle header-args in ~#+property~ keywords
50-
- [X] Understand tangle header-args directly above Org source blocks
51-
- [ ] Understand tangle subtree property drawer header-args
52-
- [X] Understand the precendence order of the tangle header-args when
49+
- [X] Understands global tangle header-args in ~#+property~ keywords
50+
- [X] Understands tangle header-args directly above Org source blocks
51+
- [-] Understands tangle subtree property drawer header-args
52+
- [X] Rudimentary parsing of the property drawer
53+
header-args. ~ntangle~ does not check the validity of the property
54+
drawer (i.e. ~:PROPERTIES:~ appears immediately after the heading,
55+
and it ends with ~:END:~, and that the properties are only between
56+
them, etc.). Also ~header-args~ is treated the same as
57+
~header-args+~ for simplicity for now.
58+
- [ ] Treat ~header-args~ vs ~header-args+~ values correctly.
59+
- [X] Understands the precendence order of the tangle header-args when
5360
a mix of global and source block header-args are used
5461
- [X] Language-specific header-args (e.g. ~#+property: header-args:nim
5562
:tangle yes~)

src/ntangle.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ proc lineAction(line: string, lnum: int) =
417417
(haType, haLang, haArgs) = line.getHeaderArgs()
418418
dbg "[line {lnum}] {line}"
419419
dbg "getHeaderArgs: line {lnum}:: {haType}, {haLang}, {haArgs}"
420-
if haType in {haPropertyKwd}:
420+
if haType in {haPropertyKwd, haPropertyDrawer, haPropertyDrawerAppend}:
421421
dbg "Property header-args found [Lang={haLang}]: {haArgs}"
422422
parseTangleHeaderProperties(haArgs, lnum, haLang, false)
423423
else:

0 commit comments

Comments
 (0)