Skip to content

Commit 2b3185c

Browse files
committed
Warn only for the known unsupported header args
Ignore all other header args
1 parent 912f9f8 commit 2b3185c

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/ntangle.nim

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -225,20 +225,13 @@ proc parseTangleHeaderProperties(hdrArgs: seq[string], lnum: int, lang: string,
225225
# # use argval
226226
# of "noweb-sep":
227227
# # use argval
228-
of "exports", "results": #Ignore args not relevant to tangling
229-
discard
230-
else:
228+
of "comments", "no-expand", "noweb", "noweb-ref", "noweb-sep":
231229
styledEcho(fgYellow, " [WARN] ",
232230
fgDefault, "Line ",
233231
styleBright, $lnum,
234232
resetStyle, fmt" - ':{arg}' header argument is not supported at the moment.")
233+
else: # Ignore all other header args
235234
discard
236-
# of "":
237-
# case argval
238-
# of "yes":
239-
# of "no":
240-
# else:
241-
# raise newException(OrgError, fmt("The '{argval}' value for ':{arg}' is invalid. The only valid values are 'yes' and 'no'."))
242235

243236
# Update the default HeaderArgs for the current orgLevel+lang
244237
# scope.

0 commit comments

Comments
 (0)