Add working forced line break implementation

This commit is contained in:
Veronica Berglyd Olsen
2024-10-24 01:25:32 +02:00
parent ff7404d01d
commit e15941520f
6 changed files with 56 additions and 46 deletions
@@ -2,19 +2,19 @@
"meta": {
"projectName": "Lorem Ipsum",
"novelAuthor": "lipsum.com",
"buildTime": 1729029144,
"buildTimeStr": "2024-10-15 23:52:24"
"buildTime": 1729725334,
"buildTimeStr": "2024-10-24 01:15:34"
},
"text": {
"nwd": [
[
"#! Lorem Ipsum",
"",
"**By lipsum.com**",
">> **By lipsum.com** <<",
"",
"\u201cNeque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit\u2026\u201d",
">> \u201cNeque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit\u2026\u201d <<",
"",
"\u201cThere is no one who loves pain itself, who seeks after it and wants to have it, simply because it is pain\u2026\u201d"
">> \u201cThere is no one who loves pain itself, who seeks after it and wants to have it, simply because it is pain\u2026\u201d <<"
],
[
"",
@@ -36,7 +36,7 @@
[
"# Act One",
"",
"\u201cFusce maximus felis libero\u201d"
">> \u201cFusce maximus felis libero\u201d <<"
],
[
"## Chapter One",
@@ -1,10 +1,10 @@
#! Lorem Ipsum
**By lipsum.com**
>> **By lipsum.com** <<
“Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit…”
>> “Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit…” <<
“There is no one who loves pain itself, who seeks after it and wants to have it, simply because it is pain…”
>> “There is no one who loves pain itself, who seeks after it and wants to have it, simply because it is pain…” <<
% Exctracted from the lipsum.com website.
@@ -23,7 +23,7 @@ _Lorem Ipsum_ is simply dummy text[footnote:f9kgf] of the printing and typesetti
# Act One
“Fusce maximus felis libero”
>> “Fusce maximus felis libero” <<
## Chapter One
+3 -3
View File
@@ -412,7 +412,7 @@ def testCoreDocBuild_Custom(mockGUI, fncPath: Path):
assert error == []
assert docFile.read_text(encoding="utf-8") == (
"#! New Novel\n\n"
"By Jane Doe\n\n"
">> By Jane Doe <<\n\n"
"## New Chapter\n\n\n"
"### New Scene\n\n\n"
)
@@ -442,7 +442,7 @@ def testCoreDocBuild_Custom(mockGUI, fncPath: Path):
assert error == []
assert docFile.read_text(encoding="utf-8") == (
"#! New Novel\n\n"
"By Jane Doe\n\n"
">> By Jane Doe <<\n\n"
"## New Chapter\n\n\n"
"### New Scene\n\n\n"
)
@@ -566,7 +566,7 @@ def testCoreDocBuild_IterBuild(mockGUI, fncPath: Path, mockRnd):
assert isinstance(docBuild.lastBuild, ToRaw)
assert docFile.read_text(encoding="utf-8") == (
"#! New Novel\n\n"
"By Jane Doe\n\n"
">> By Jane Doe <<\n\n"
"## New Chapter\n\n\n"
"### New Scene\n\n\n"
"#! Notes: Plot\n\n"
+7 -7
View File
@@ -842,13 +842,13 @@ def testFmtToken_MarginFormat(mockGUI):
]
assert tokens._raw[-1] == (
"Some regular text\n\n"
"Some left-aligned text\n\n"
"Some right-aligned text\n\n"
"Some centered text\n\n"
"Left-indented block\n\n"
"Right-indented block\n\n"
"Double-indented block\n\n"
"Right-indent, right-aligned\n\n\n"
"Some left-aligned text <<\n\n"
">> Some right-aligned text\n\n"
">> Some centered text <<\n\n"
"> Left-indented block\n\n"
"Right-indented block <\n\n"
"> Double-indented block <\n\n"
">> Right-indent, right-aligned <\n\n\n"
)