File tree Expand file tree Collapse file tree 4 files changed +10
-2
lines changed
Expand file tree Collapse file tree 4 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -366,6 +366,7 @@ proc getHeaderArgs(s: string): LangAndArgs =
366366 dbg " spaceSepParts: {spaceSepParts}"
367367 if spaceSepParts.len >= 3 and
368368 spaceSepParts[0 ].toLowerAscii () == " #+property:" :
369+ doAssert spaceSepParts[2 ][0 ] == ':'
369370 headerArgsRaw = spaceSepParts[2 .. spaceSepParts.high]
370371 let
371372 kwdParts = spaceSepParts[1 ].split (" :" )
@@ -375,6 +376,7 @@ proc getHeaderArgs(s: string): LangAndArgs =
375376 # ":header-args:", ":header-args+:", ":header-args:nim:"
376377 elif spaceSepParts.len >= 3 and
377378 spaceSepParts[0 ].toLowerAscii ().startsWith (" :header-args" ):
379+ doAssert spaceSepParts[1 ][0 ] == ':'
378380 headerArgsRaw = spaceSepParts[1 .. spaceSepParts.high]
379381 let
380382 kwdParts = spaceSepParts[0 ].split (" :" )
@@ -384,6 +386,7 @@ proc getHeaderArgs(s: string): LangAndArgs =
384386 elif spaceSepParts.len >= 2 and
385387 spaceSepParts[0 ].toLowerAscii () == " #+begin_src" :
386388 if spaceSepParts.len >= 3 :
389+ doAssert spaceSepParts[2 ][0 ] == ':'
387390 headerArgsRaw = spaceSepParts[2 .. spaceSepParts.high]
388391 lang = spaceSepParts[1 ].strip ()
389392 haType = haBeginSrc
Original file line number Diff line number Diff line change 1+ Below block should not be tangled.
2+ #+begin_src nim tangle yes
3+ echo "this source block has an invalid tangle arg, no colon"
4+ #+end_src
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
2- # Time-stamp: <2018-10-05 13:51:42 kmodi>
2+ # Time-stamp: <2018-10-07 00:27:00 kmodi>
33
44set -euo pipefail # http://redsymbol.net/articles/unofficial-bash-strict-mode
55IFS=$' \n\t '
@@ -17,6 +17,7 @@ run_test () {
1717 " ${bin} " tests/nested_src/
1818
1919 " ${bin} " tests/missing_arg_value/missing_arg_value.org || true
20+ " ${bin} " tests/invalid_arg_no_colon/ || true
2021
2122 rm -rf ./tests/foo/bar/
2223 " ${bin} " tests/mkdirp_no/mkdirp_no.org || true
Original file line number Diff line number Diff line change @@ -1695,7 +1695,7 @@ that they come in two flavors: lightweight tags and tags objects.
16951695We don't even need to implement tag objects, we can reuse =GitCommit=
16961696and just change the =fmt= field:
16971697
1698- #+BEGIN_SRC python tangle libwyag.py
1698+ #+BEGIN_SRC python : tangle libwyag.py
16991699class GitTag(GitCommit):
17001700 fmt = b'tag'
17011701#+END_SRC
You can’t perform that action at this time.
0 commit comments