Skip to content

Commit 70ee357

Browse files
author
Yves Orton
committed
embeddable regex - more doc tweaks. (squash me)
* Sentences should not start with 'And'. * Rework sentence about unlisted regex compile options. * Consistent formatting for the the 'strict' option.
1 parent 65d1215 commit 70ee357

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lib/elixir/lib/regex.ex

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -419,8 +419,9 @@ defmodule Regex do
419419
as an embeddable modifier in the current version of PCRE and strict is true
420420
(the default) then an ArgumentError exception will be raised.
421421
422-
When strict is false the pattern will be returned as though any offending
423-
options had not be used and the function will not raise any exceptions.
422+
When the `:strict` option is false the pattern will be returned as though
423+
any offending options had not be used and the function will not raise any
424+
exceptions.
424425
425426
Embeddable modifiers/options are currently:
426427
@@ -429,13 +430,14 @@ defmodule Regex do
429430
* 's' - `:dotall, {:newline, :anycrlf}`
430431
* 'x' - `:extended`
431432
432-
And unembeddable modifiers are:
433+
Unembeddable modifiers are:
433434
434435
* 'f' - `:firstline`
435436
* 'U' - `:ungreedy`
436437
* 'u' - `:unicode, :ucp`
437438
438-
Any other regex compilation option not listed here is considered unembeddable.
439+
Any other regex compilation option not listed here is considered unembeddable
440+
and will raise an exception unless the `:strict` option is false.
439441
440442
## Examples
441443
iex> Regex.to_embed(~r/foo/)

0 commit comments

Comments
 (0)