mirror of
https://github.com/Oreolek/gamebookformat.git
synced 2024-06-16 23:20:44 +03:00
Split some too long lines.
This commit is contained in:
parent
b14a676a31
commit
4fdb5dddcd
|
@ -122,11 +122,13 @@ def parse_file_to_book(inputfile, book):
|
|||
elif name:
|
||||
text = text + " " + line.strip()
|
||||
elif len(line.strip()):
|
||||
raise Exception("unknown content before sections: %s" % line.strip())
|
||||
raise Exception("unknown content before sections: %s"
|
||||
% line.strip())
|
||||
if name:
|
||||
add_section_to_book(book, name, text, intro_section, number, tags)
|
||||
|
||||
def add_section_to_book(book, name, text, intro_section=False, number=None, tags=None):
|
||||
def add_section_to_book(book, name, text, intro_section=False,
|
||||
number=None, tags=None):
|
||||
section = sections.Section(name, text)
|
||||
if tags:
|
||||
section.add_tags(tags)
|
||||
|
|
|
@ -180,7 +180,8 @@ var gamebook = {
|
|||
var hasAutoScope = false;
|
||||
var xorEnableNext = false;
|
||||
var autoDisableAllRemainingLinks = (
|
||||
gamebook.player.started && e.classList.contains('introsectionbody'));
|
||||
gamebook.player.started
|
||||
&& e.classList.contains('introsectionbody'));
|
||||
Array.prototype.forEach.call(e.childNodes, function(c) {
|
||||
if (!c.classList) {
|
||||
return;
|
||||
|
|
|
@ -26,7 +26,8 @@ class ShuffledSection (Section):
|
|||
|
||||
def __repr__(self):
|
||||
return "ShuffledSection(%d, %s, %s, %s)" % (self.nr,
|
||||
repr(self.name), repr(self.text),
|
||||
repr(self.name),
|
||||
repr(self.text),
|
||||
repr(self.tags))
|
||||
|
||||
class IntroSection (Section):
|
||||
|
@ -37,7 +38,8 @@ class IntroSection (Section):
|
|||
self.tags = section.tags.copy()
|
||||
|
||||
def __repr__(self):
|
||||
return "IntroSection(%d, %s, %s, %s)" % (repr(self.name), repr(self.text),
|
||||
return "IntroSection(%d, %s, %s, %s)" % (repr(self.name),
|
||||
repr(self.text),
|
||||
repr(self.tags))
|
||||
|
||||
class ShuffledSections:
|
||||
|
|
Loading…
Reference in a new issue