You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* ignore tests
* added british dialogue regex
* added tests for british dialogue
* added actions
* removed 2.7, 3.6, and added 3.10
* reordered job dependencies
* auto approved dependabot and davidlday
* updated readme for british style
* v1.1.0
* splitting out jobs
* reuse community workflow
* maybe just in workflows?
* nope
* try from a different repo
* spelling matters
* moved python-lint to community health repo
* use reusables
* use community testpub and pub
* reusable autoapprove
Note: The empty strings are a feature of Python's `split()` function. See
58
+
[Why are empty strings returned in split() results?](https://stackoverflow.com/questions/2197451/why-are-empty-strings-returned-in-split-results#2197493)
60
59
for an explanation.
60
+
61
+
### British Style
62
+
63
+
Each function accepts a second parameter of a regular expression used to parse
64
+
out the dialogue. This defaults to `narrative.DIALOGUE_RE`, which follows the
65
+
American standard of using double quotes for initial quotes. `narrative` now
66
+
includes a second regular expression, `narrative.BRITISH_DIALOGUE_RE`, which
67
+
follows the British style of using single quotes for initial quotes. Simply use
Copy file name to clipboardExpand all lines: tests/test_narrative.py
+33Lines changed: 33 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,18 @@
2
2
3
3
importnarrative
4
4
5
+
BRITISH_EXCERPT="""‘Economic systems’, according to Professor White, ‘are an inevitable byproduct of civilization, and are, as John Doe said, “with us whether we want them or not”’.
"‘are an inevitable byproduct of civilization, and are, as John Doe said, “with us whether we want them or not”’.\n",
12
+
]
13
+
14
+
BRITISH_NARRATIVE= ["", ", according to Professor White, ", ""]
15
+
16
+
5
17
EXCERPT="""Some one recklessly lifted the veil. By one breath of an uttered word he destroyed the serene charm, and uncovered the truth in its ugly nakedness. No thought was clearly defined in his mind, when his lips smilingly asked: "Why do you not tell us, Lazarus, what was There?" And all became silent, struck with the question. Only now it seemed to have occurred to them that for three days Lazarus had been dead; and they looked with curiosity, awaiting an answer. But Lazarus remained silent.
6
18
7
19
"You will not tell us?" wondered the inquirer. "Is it so terrible there?"
0 commit comments