aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/scala')
-rw-r--r--src/main/scala/reading/Books.scala18
-rw-r--r--src/main/scala/reading/models/Book.scala8
2 files changed, 16 insertions, 10 deletions
diff --git a/src/main/scala/reading/Books.scala b/src/main/scala/reading/Books.scala
index 65c893f..42a1c26 100644
--- a/src/main/scala/reading/Books.scala
+++ b/src/main/scala/reading/Books.scala
@@ -148,7 +148,7 @@ object Books {
),
Book(
- title = "L’Enfant Océan",
+ title = "L'Enfant Océan",
author = "J-C MOURLEVAT et Vincent DUTRAIT",
year = "2010",
period = None,
@@ -159,7 +159,7 @@ object Books {
),
Book(
- title = "L’oeil du loup",
+ title = "L'oeil du loup",
author = "Daniel PENNAC",
year = "1984",
period = None,
@@ -284,7 +284,7 @@ object Books {
),
Book(
- title = "L’Espionne du Roi-Soleil",
+ title = "L'Espionne du Roi-Soleil",
author = "Annie PIETRI",
year = "2002",
period = Some(Louis14),
@@ -295,7 +295,7 @@ object Books {
),
Book(
- title = "L’Omelette au sucre",
+ title = "L'Omelette au sucre",
author = "JP ARROU-VIGNOD",
year = "1999",
period = Some(Contemporain),
@@ -440,7 +440,7 @@ object Books {
),
Book(
- title = "La Quête d’Ewilan",
+ title = "La Quête d'Ewilan",
author = "Pierre BOTTERO",
year = "2005-2016",
parts = 4,
@@ -452,7 +452,7 @@ object Books {
),
Book(
- title = "Les Mondes d’Ewilan",
+ title = "Les Mondes d'Ewilan",
author = "Pierre BOTTERO et Jean-Louis THOUARD",
year = "2005-2006",
parts = 3,
@@ -611,7 +611,7 @@ object Books {
),
Book(
- title = "La Rivière à l’envers",
+ title = "La rivière à l'envers",
author = "J-C MOURLEVAT",
year = "2000-2002",
parts = 2,
@@ -782,7 +782,7 @@ object Books {
),
Book(
- title = "L’Etrange cas du Dr JEKYLL et M. HYDE",
+ title = "L'Étrange cas du Dr Jekyll et de M. Hyde",
author = "R.L STEVENSON",
year = "1886",
period = None,
@@ -837,7 +837,7 @@ object Books {
),
Book(
- title = "L’Ordre Terne",
+ title = "L'Ordre Terne",
author = "I.M NANCY",
year = "2015-2016",
parts = 2,
diff --git a/src/main/scala/reading/models/Book.scala b/src/main/scala/reading/models/Book.scala
index 7930a63..836fa19 100644
--- a/src/main/scala/reading/models/Book.scala
+++ b/src/main/scala/reading/models/Book.scala
@@ -13,7 +13,13 @@ case class Book(
) extends Ordered[Book] {
def compare(that: Book) = {
def formatTitle(title: String) =
- title.toLowerCase.replaceAll("^les ", "").replaceAll("^le ", "")
+ title
+ .toLowerCase
+ .replaceAll("^les ", "")
+ .replaceAll("^le ", "")
+ .replaceAll("^l'", "")
+ .replaceAll("^é", "e")
+ .replaceAll("^è", "e")
formatTitle(this.title).compare(formatTitle(that.title))
}
}