diff --git a/nw/core/tokenizer.py b/nw/core/tokenizer.py index c94f418f..efa2e906 100644 --- a/nw/core/tokenizer.py +++ b/nw/core/tokenizer.py @@ -540,6 +540,20 @@ class Tokenizer(): tToken[0], tToken[1], tToken[2], tToken[3] | self.A_PBA ) + if self.isPage: + for n, tToken in enumerate(self.theTokens): + tType = tToken[0] + tText = tToken[1] + tFormat = tToken[2] + if n == 0: + self.theTokens[n] = ( + tType, tText, tFormat, self.A_LEFT | self.A_PBB + ) + else: + self.theTokens[n] = ( + tType, tText, tFormat, self.A_LEFT + ) + return ## diff --git a/sample/data_9/74e400180a99_main.nwd b/sample/data_9/74e400180a99_main.nwd new file mode 100644 index 00000000..303d5232 --- /dev/null +++ b/sample/data_9/74e400180a99_main.nwd @@ -0,0 +1,4 @@ +%%~ 974e400180a99:7031beac91f75:Page +This is a plain page with some text on it. + +This file should receive no special formatting, but the text will always be left aligned and the content will always start on a fresh page when the project is exported. diff --git a/sample/nwProject.nwx b/sample/nwProject.nwx index 45b7503b..ad832035 100644 --- a/sample/nwProject.nwx +++ b/sample/nwProject.nwx @@ -1,5 +1,5 @@ - + Sample Project Sample Project @@ -11,8 +11,8 @@ True True 636b6aa9b697b - 6a2d6d5f4f401 - 875 + ba8a28a246524 + 914 B E @@ -44,7 +44,7 @@ Main - + Novel ROOT @@ -65,20 +65,33 @@ 2 78 - - Part 1 + + Page + FILE + NOVEL + New + False + True + PAGE + 208 + 40 + 2 + 213 + + + Part One FILE NOVEL New False True PARTITION - 0 - 0 - 0 + 23 + 5 + 1 0 - + A Folder FOLDER NOVEL @@ -277,9 +290,9 @@ False True SCENE - 30 - 6 - 1 + 0 + 0 + 0 36