Skip to content

Commit

Permalink
Generated Vals are rendered in camelCase
Browse files Browse the repository at this point in the history
  • Loading branch information
davesmith00000 committed Sep 23, 2023
1 parent ea94355 commit 8a9409e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ final case class DataFrame(data: Array[Array[DataType]], columnCount: Int) {
def toSafeNameCamel: String => String = { name: String =>
name.replaceAll("[^a-zA-Z0-9]", "-").split("-").toList.filterNot(_.isEmpty) match {
case h :: t if h.take(1).matches("[0-9]") => ("_" :: h :: t.map(_.capitalize)).mkString
case h :: t => (h :: t.map(_.capitalize)).mkString
case h :: t => (h.toLowerCase :: t.map(_.capitalize)).mkString
case l => l.map(_.capitalize).mkString
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class GeneratorAcceptanceTests extends munit.FunSuite {
|
|// DO NOT EDIT: Generated by Indigo.
|
|enum Armour(val DefenseBonus: Int):
|enum Armour(val defenseBonus: Int):
| case LeatherArmor extends Armour(1)
| case ChainMail extends Armour(3)
|""".stripMargin
Expand Down

0 comments on commit 8a9409e

Please sign in to comment.