Add support for markdown files as sources
This commit is contained in:
parent
3b8d8a4ecc
commit
18ad8bcc99
|
@ -122,8 +122,12 @@ sub scan-ipkg(IO::Path:D $ipkg --> PackageInfo:D) {
|
|||
'"' $<value>=[<-["]>*] '"' /)<value>
|
||||
// "src";
|
||||
|
||||
my sub is-source(Str:D $file --> Bool) {
|
||||
return $file.ends-with(".idr") || $file.ends-with(".md");
|
||||
}
|
||||
|
||||
my IO::Path:D @sources =
|
||||
paths($ipkg.parent.add($src-dir), :file(*.ends-with(".idr"))).map(*.IO);
|
||||
paths($ipkg.parent.add($src-dir), :file(&is-source)).map(*.IO);
|
||||
PackageInfo.new(ipkg => $ipkg, root => $ipkg.parent, sources => @sources)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue