-
-
Notifications
You must be signed in to change notification settings - Fork 690
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gherkin/java:Support unicode colon as separator. #223
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,15 @@ | ||
package gherkin; | ||
|
||
import java.util.regex.Pattern; | ||
|
||
public interface GherkinLanguageConstants { | ||
String TAG_PREFIX = "@"; | ||
String COMMENT_PREFIX = "#"; | ||
String TITLE_KEYWORD_SEPARATOR = ":"; | ||
Pattern TITLE_KEYWORD_SEPARATOR2 = Pattern.compile(":|:"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change must be ported to all other Gherkin implementations (Go, C, Ruby, JavaScript etc) before it can be merged. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should we introduce a constants TITLE_KEYWORD_SEPARATOR_LENGTH? since pattern have no length. |
||
String TABLE_CELL_SEPARATOR = "|"; | ||
String DOCSTRING_SEPARATOR = "\"\"\""; | ||
String DOCSTRING_ALTERNATIVE_SEPARATOR = "```"; | ||
|
||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#language: zh-CN | ||
功能:汉语解析 | ||
|
||
场景:冒号可以用在功能和场景中 | ||
* 冒号 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"document": { | ||
"comments": [], | ||
"feature": { | ||
"children": [ | ||
{ | ||
"keyword": "场景", | ||
"location": { | ||
"column": 3, | ||
"line": 4 | ||
}, | ||
"name": "冒号可以用在功能和场景中", | ||
"steps": [ | ||
{ | ||
"keyword": "* ", | ||
"location": { | ||
"column": 5, | ||
"line": 5 | ||
}, | ||
"text": "冒号", | ||
"type": "Step" | ||
} | ||
], | ||
"tags": [], | ||
"type": "Scenario" | ||
} | ||
], | ||
"keyword": "功能", | ||
"language": "zh-CN", | ||
"location": { | ||
"column": 1, | ||
"line": 2 | ||
}, | ||
"name": "汉语解析", | ||
"tags": [], | ||
"type": "Feature" | ||
}, | ||
"type": "GherkinDocument" | ||
}, | ||
"type": "gherkin-document", | ||
"uri": "testdata/good/i18n_zh-cn.feature" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"pickle": { | ||
"language": "zh-CN", | ||
"locations": [ | ||
{ | ||
"column": 3, | ||
"line": 4 | ||
} | ||
], | ||
"name": "冒号可以用在功能和场景中", | ||
"steps": [ | ||
{ | ||
"arguments": [], | ||
"locations": [ | ||
{ | ||
"column": 7, | ||
"line": 5 | ||
} | ||
], | ||
"text": "冒号" | ||
} | ||
], | ||
"tags": [] | ||
}, | ||
"type": "pickle", | ||
"uri": "testdata/good/i18n_zh-cn.feature" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"data": "#language: zh-CN\n功能:汉语解析\n\n 场景:冒号可以用在功能和场景中\n * 冒号\n", | ||
"media": { | ||
"encoding": "utf-8", | ||
"type": "text/vnd.cucumber.gherkin+plain" | ||
}, | ||
"type": "source", | ||
"uri": "testdata/good/i18n_zh-cn.feature" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
(1:1)Language:/zh-CN/ | ||
(2:1)FeatureLine:功能/汉语解析/ | ||
(3:1)Empty:// | ||
(4:3)ScenarioLine:场景/冒号可以用在功能和场景中/ | ||
(5:5)StepLine:* /冒号/ | ||
EOF |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the old
TITLE_KEYWORD_SEPARATOR
and renameTITLE_KEYWORD_SEPARATOR2
toTITLE_KEYWORD_SEPARATOR