Skip to content

Commit

Permalink
Merge branch 'add-ascii-shorthand'
Browse files Browse the repository at this point in the history
  • Loading branch information
faern committed Oct 3, 2024
2 parents b00c498 + 683383f commit 522a64e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ impl FromStr for CharacterType {
type Err = InvalidCharacterType;

fn from_str(s: &str) -> Result<Self, Self::Err> {
// Shorthand to the ascii unicode block
if s == "ascii" {
return Ok(Self::Block(&crate::unicode_blocks::BASIC_LATIN));
}
if s == "bidi" {
return Ok(Self::Bidi);
}
Expand Down

0 comments on commit 522a64e

Please sign in to comment.