From abbbec9e4a9d1cf67889abd50e93ca79f2b7725d Mon Sep 17 00:00:00 2001 From: Alexander Krotov Date: Tue, 8 Jan 2019 19:52:51 +0300 Subject: [PATCH] Acronym: add underscore test case Many regular expression libraries have a way to detect word boundaries, but their definition of word characters includes underscores. \b and \w metacharacters were designed to detect programming language keywords, and it is a common mistake to use them to match words in natural languages. --- exercises/acronym/canonical-data.json | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/exercises/acronym/canonical-data.json b/exercises/acronym/canonical-data.json index 502ea7765d..b71c50c743 100644 --- a/exercises/acronym/canonical-data.json +++ b/exercises/acronym/canonical-data.json @@ -1,6 +1,6 @@ { "exercise": "acronym", - "version": "1.6.0", + "version": "1.7.0", "cases": [ { "description": "Abbreviate a phrase", @@ -68,6 +68,14 @@ "phrase": "Halley's Comet" }, "expected": "HC" + }, + { + "description": "underscore emphasis", + "property": "abbreviate", + "input": { + "phrase": "The Road _Not_ Taken" + }, + "expected": "TRNT" } ] }