We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 738b398 commit 8646b5bCopy full SHA for 8646b5b
fnl/nfnl/header.fnl
@@ -1,5 +1,6 @@
1
(local {: autoload : define} (require :nfnl.module))
2
(local core (autoload :nfnl.core))
3
+(local str (autoload :nfnl.string))
4
5
(local M (define :nfnl.header))
6
@@ -11,9 +12,10 @@
11
12
13
(fn M.tagged? [s]
14
"Is the line an nfnl tagged header line?"
- (core.string? (s:find tag 1 true)))
15
+ (core.number? (s:find tag 1 true)))
16
-(fn M.source-path []
17
- "")
+(fn M.source-path [s]
18
+ (when (M.tagged? s)
19
+ (core.last (str.split s "%s+"))))
20
21
M
lua/nfnl/header.lua
0 commit comments