Update docs.

This commit is contained in:
Dillon Kearns 2021-05-28 13:20:07 -07:00
parent 124846eeb9
commit e627200ef8
2 changed files with 26 additions and 6 deletions

File diff suppressed because one or more lines are too long

View File

@ -6,7 +6,9 @@ module DataSource.Glob exposing
, int, digits
, expectUniqueMatch
, literal
, atLeastOne, map, oneOf, succeed, toDataSource, zeroOrMore
, map, succeed, toDataSource
, oneOf
, zeroOrMore, atLeastOne
)
{-|
@ -200,7 +202,11 @@ That will give us
@docs literal
@docs atLeastOne, map, oneOf, succeed, toDataSource, zeroOrMore
@docs map, succeed, toDataSource
@docs oneOf
@docs zeroOrMore, atLeastOne
-}
@ -430,8 +436,8 @@ Leading 0's are ignored.
import DataSource exposing (DataSource)
import DataSource.Glob as Glob
archives : DataSource (List Int)
archives =
slides : DataSource (List Int)
slides =
Glob.succeed identity
|> Glob.match (Glob.literal "slide-")
|> Glob.capture Glob.int
@ -459,8 +465,22 @@ With files
Yields
matches : DataSource (List Int)
matches =
DataSource.succeed [ 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 ]
DataSource.succeed
[ 1
, 1
, 2
, 3
, 4
, 5
, 6
, 7
, 8
, 9
, 10
, 11
]
Note that neither `slide-no-match.md` nor `slide-.md` match.
And both `slide-1.md` and `slide-01.md` match and turn into `1`.