Skip to content

Commit 05ea5a2

Browse files
authored
RELEASE: v2.33.4
## Changelog: * Updated the HTML parser to handle custom elements.
2 parents 9f81847 + de97925 commit 05ea5a2

33 files changed

+509
-490
lines changed

dist/format.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/api/api-config.md

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The `Config` object controls various aspects of SugarCube's behavior.
2121

2222
Determines whether the audio subsystem automatically pauses tracks that have been faded to `0` volume (silent).
2323

24-
#### Since:
24+
#### History:
2525

2626
* `v2.28.0`: Introduced.
2727

@@ -41,7 +41,7 @@ Determines whether the audio subsystem attempts to preload track metadata—mean
4141
It is unlikely that you will ever want to disable this setting.
4242
</p>
4343

44-
#### Since:
44+
#### History:
4545

4646
* `v2.28.0`: Introduced.
4747

@@ -63,7 +63,7 @@ Config.audio.preloadMetadata = false;
6363

6464
Determines whether the story's history controls (Backward, Jump To, & Forward buttons) are enabled within the UI bar.
6565

66-
#### Since:
66+
#### History:
6767

6868
* `v2.0.0`: Introduced.
6969

@@ -79,7 +79,7 @@ Config.history.controls = false;
7979

8080
Sets the maximum number of states (moments) to which the history is allowed to grow. Should the history exceed the limit, states will be dropped from the past (oldest first). A setting of `0` means that there is no limit to how large the history may grow, though doing so is not recommended.
8181

82-
#### Since:
82+
#### History:
8383

8484
* `v2.0.0`: Introduced.
8585

@@ -112,7 +112,7 @@ Determines whether the [`<<if>>` macro](#macros-macro-if) returns an error when
112112
This setting exists because it's unlikely that you'll ever want to actually perform an assignment within a conditional expression and typing <code>=</code> when you meant <code>===</code> (or <code>==</code>) is a fairly easy to mistake make—either from a finger slip or because you just don't know the difference between the operators.
113113
</p>
114114

115-
#### Since:
115+
#### History:
116116

117117
* `v2.0.0`: Introduced.
118118

@@ -133,7 +133,7 @@ Sets the maximum number of iterations allowed before the [`<<for>>` macro](#macr
133133
This setting exists to prevent a misconfigured loop from making the browser unresponsive.
134134
</p>
135135

136-
#### Since:
136+
#### History:
137137

138138
* `v2.0.0`: Introduced.
139139

@@ -150,7 +150,7 @@ Config.macros.maxLoopIterations = 5000;
150150

151151
Sets the default [`KeyboardEvent.key`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key) value that causes the currently running [`<<type>>` macro](#macros-macro-type) instance to finish typing its content immediately.
152152

153-
#### Since:
153+
#### History:
154154

155155
* `v2.33.1`: Introduced.
156156

@@ -167,7 +167,7 @@ Config.macros.typeSkipKey = "Control";
167167

168168
Determines whether the [`<<type>>` macro](#macros-macro-type) types out content on previously visited passages or simply outputs it immediately.
169169

170-
#### Since:
170+
#### History:
171171

172172
* `v2.32.0`: Introduced.
173173

@@ -190,7 +190,7 @@ Config.macros.typeVisitedPassages = false;
190190

191191
Allows the destination of passage navigation to be overridden. The callback is passed one parameter, the original destination passage title. If its return value is falsy, the override is cancelled and navigation to the original destination continues unperturbed. If its return value is truthy, the override succeeds and that value is used as the new destination of the navigation.
192192

193-
#### Since:
193+
#### History:
194194

195195
* `v2.13.0`: Introduced.
196196

@@ -236,7 +236,7 @@ Determines whether alternate passage descriptions are used by the *Saves* and *J
236236
</ul>
237237
</div>
238238

239-
#### Since:
239+
#### History:
240240

241241
* `v2.0.0`: Introduced.
242242

@@ -265,7 +265,7 @@ Config.passages.descriptions = function () {
265265

266266
Determines whether passage titles are combined with the story title, within the browser's/tab's titlebar, when passages are displayed.
267267

268-
#### Since:
268+
#### History:
269269

270270
* `v2.0.0`: Introduced.
271271

@@ -285,7 +285,7 @@ Determines whether rendering passages have their leading/trailing newlines remov
285285
Does not affect <code>script</code> or <code>stylesheet</code> tagged passages, for Twine&nbsp;1/Twee, or the Story JavaScript or Story Stylesheet sections, for Twine&nbsp;2.
286286
</p>
287287

288-
#### Since:
288+
#### History:
289289

290290
* `v2.19.0`: Introduced.
291291

@@ -309,7 +309,7 @@ Does not affect <code>script</code> or <code>stylesheet</code> tagged passages,
309309
The function will be called just before the built-in no-break passage processing if you're also using that—see the <a href="#config-api-property-passages-nobr"><code>Config.passages.nobr</code> setting</a> and <a href="#special-tag-nobr"><code>nobr</code> special tag</a>.
310310
</p>
311311

312-
#### Since:
312+
#### History:
313313

314314
* `v2.30.0`: Introduced.
315315

@@ -328,7 +328,7 @@ Config.passages.onProcess = function (p) {
328328

329329
Sets the starting passage, the very first passage that will be displayed.
330330

331-
#### Since:
331+
#### History:
332332

333333
* `v2.0.0`: Introduced.
334334

@@ -348,7 +348,7 @@ Determines whether outgoing passage transitions are enabled. Valid values are t
348348
If using an integer delay, ideally, it should probably be slightly longer than the outgoing transition delay that you intend to use—e.g., an additional 10ms or so should be sufficient.
349349
</p>
350350

351-
#### Since:
351+
#### History:
352352

353353
* `v2.0.0`: Introduced.
354354

@@ -405,7 +405,7 @@ Determines whether the autosave, if it exists, is automatically loaded upon stor
405405
If the autosave cannot be loaded, for any reason, then the start passage is loaded instead.
406406
</p>
407407

408-
#### Since:
408+
#### History:
409409

410410
* `v2.0.0`: Introduced.
411411

@@ -434,7 +434,7 @@ Determines whether the autosave is created/updated when passages are displayed.
434434
When setting the value to boolean <code>true</code>, you will likely also need to use the <a href="#config-api-property-saves-isallowed"><code>Config.saves.isAllowed</code> property</a> to disallow saving on the start passage. Or, if you use the start passage as real part of your story and allow the player to reenter it, rather than just as the initial landing/cover page, then you may wish to only disallow saving on the start passage the very first time it's displayed—i.e., at story startup.
435435
</p>
436436

437-
#### Since:
437+
#### History:
438438

439439
* `v2.0.0`: Introduced.
440440
* `v2.30.0`: Added function values and deprecated string values.
@@ -460,7 +460,7 @@ Config.saves.autosave = function () {
460460

461461
Sets the story ID associated with saves.
462462

463-
#### Since:
463+
#### History:
464464

465465
* `v2.0.0`: Introduced.
466466

@@ -476,7 +476,7 @@ Config.saves.id = "a-big-huge-story-part-1";
476476

477477
Determines whether saving is allowed within the current context. The callback is invoked each time a save is requested. If its return value is falsy, the save is disallowed. If its return value is truthy, the save is allowed to continue unperturbed.
478478

479-
#### Since:
479+
#### History:
480480

481481
* `v2.0.0`: Introduced.
482482

@@ -494,7 +494,7 @@ Config.saves.isAllowed = function () {
494494

495495
Performs any required pre-processing before the save data is loaded—e.g., upgrading out-of-date save data. The callback is passed one parameter, the save object to be processed. If it encounters an unrecoverable problem during its processing, it may throw an exception containing an error message; the message will be displayed to the player and loading of the save will be terminated.
496496

497-
#### Since:
497+
#### History:
498498

499499
* `v2.0.0`: Introduced.
500500

@@ -522,7 +522,7 @@ Config.saves.onLoad = function (save) {
522522

523523
Performs any required post-processing before the save data is saved. The callback is passed two parameters, the save object to be processed and save operation details object.
524524

525-
#### Since:
525+
#### History:
526526

527527
* `v2.0.0`: Introduced.
528528
* `v2.33.0`: Added save operation details object parameter to the callback function.
@@ -581,7 +581,7 @@ Config.saves.onSave = function (save, details) {
581581

582582
Sets the maximum number of available save slots.
583583

584-
#### Since:
584+
#### History:
585585

586586
* `v2.0.0`: Introduced.
587587

@@ -601,7 +601,7 @@ Sets the `version` property of saves.
601601
This setting is only used to set the <code>version</code> property of saves. Thus, it is only truly useful if you plan to upgrade out-of-date saves via a <a href="#config-api-property-saves-onload"><code>Config.saves.onLoad</code></a> callback.
602602
</p>
603603

604-
#### Since:
604+
#### History:
605605

606606
* `v2.0.0`: Introduced.
607607

@@ -627,7 +627,7 @@ Config.saves.version = "v3";
627627

628628
Determines whether the UI bar (sidebar) starts in the stowed (shut) state initially. Valid values are boolean `true`/`false`, which causes the UI bar to always/never start in the stowed state, or an integer, which causes the UI bar to start in the stowed state if the viewport width is less-than-or-equal-to the specified number of pixels.
629629

630-
#### Since:
630+
#### History:
631631

632632
* `v2.11.0`: Introduced.
633633

@@ -654,7 +654,7 @@ Determines whether certain elements within the UI bar are updated when passages
654654
The story title is not included in updates because SugarCube uses it as the basis for the key used to store and load data used when playing the story and for saves.
655655
</p>
656656

657-
#### Since:
657+
#### History:
658658

659659
* `v2.0.0`: Introduced.
660660

@@ -681,7 +681,7 @@ Determines whether the `link-visited` class is added to internal passage links t
681681
You <em>must</em> provide your own styling for the <code>link-visited</code> class as none is provided by default.
682682
</p>
683683

684-
#### Since:
684+
#### History:
685685

686686
* `v2.0.0`: Introduced.
687687

@@ -707,7 +707,7 @@ You will also need to specify a `.link-visited` style that defines the propertie
707707

708708
Determines whether the output of the Wikifier is post-processed into more sane markup—i.e., where appropriate, it tries to transition the plethora of `<br>` elements into `<p>` elements.
709709

710-
#### Since:
710+
#### History:
711711

712712
* `v2.0.0`: Introduced.
713713

@@ -727,7 +727,7 @@ Indicates whether SugarCube is running in test mode, which enables debug views.
727727
This property is automatically set based on whether you're using a testing mode in a Twine compiler—i.e., <em>Test</em> mode in Twine&nbsp;2, <em>Test Play From Here</em> in Twine&nbsp;1, or the test mode option (<code>-t</code>, <code>--test</code>) in Tweego. You may, however, forcibly enable it if you need to for some reason—e.g., if you're using another compiler, which doesn't offer a way to enable test mode.
728728
</p>
729729

730-
#### Since:
730+
#### History:
731731

732732
* `v2.2.0`: Introduced.
733733

@@ -754,7 +754,7 @@ if (Config.debug) {
754754

755755
Sets the integer delay (in milliseconds) before the loading screen is dismissed, once the document has signaled its readiness. Not generally necessary, however, some browsers render slower than others and may need a little extra time to get a media-heavy page done. This allows you to fine tune for those cases.
756756

757-
#### Since:
757+
#### History:
758758

759759
* `v2.0.0`: Introduced.
760760

docs/api/api-dialog.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Appends the given content to the dialog's content area. Returns a reference to
1313
If your content contains any SugarCube markup, you'll need to use the <a href="#dialog-api-method-wiki"><code>Dialog.wiki()</code> method</a> instead.
1414
</p>
1515

16-
#### Since:
16+
#### History:
1717

1818
* `v2.9.0`: Introduced.
1919

@@ -35,7 +35,7 @@ Dialog.append( /* some DOM nodes */ );
3535

3636
Returns a reference to the dialog's content area.
3737

38-
#### Since:
38+
#### History:
3939

4040
* `v2.0.0`: Introduced.
4141

@@ -55,7 +55,7 @@ jQuery(Dialog.body()).wiki("Cry 'Havoc!', and let slip the //ponies// of ''frien
5555

5656
Closes the dialog. Returns a reference to the `Dialog` object for chaining.
5757

58-
#### Since:
58+
#### History:
5959

6060
* `v2.0.0`: Introduced.
6161

@@ -73,7 +73,7 @@ Dialog.close();
7373

7474
Returns whether the dialog is currently open.
7575

76-
#### Since:
76+
#### History:
7777

7878
* `v2.0.0`: Introduced.
7979

@@ -103,7 +103,7 @@ Opens the dialog. Returns a reference to the `Dialog` object for chaining.
103103
Call this only after populating the dialog with content.
104104
</p>
105105

106-
#### Since:
106+
#### History:
107107

108108
* `v2.0.0`: Introduced.
109109

@@ -130,7 +130,7 @@ Dialog.open();
130130

131131
Prepares the dialog for use and returns a reference to its content area.
132132

133-
#### Since:
133+
#### History:
134134

135135
* `v2.0.0`: Introduced.
136136

@@ -168,7 +168,7 @@ Renders the given [markup](#markup) and appends it to the dialog's content area.
168168
If your content consists of DOM nodes, you'll need to use the <a href="#dialog-api-method-append"><code>Dialog.append()</code> method</a> instead.
169169
</p>
170170

171-
#### Since:
171+
#### History:
172172

173173
* `v2.9.0`: Introduced.
174174

@@ -190,7 +190,7 @@ Dialog.wiki("Cry 'Havoc!', and let slip the //ponies// of ''friendship''.");
190190
This method has been deprecated and should no longer be used. The core of what it does is simply to wrap a call to <a href="#dialog-api-method-open"><code>Dialog.open()</code></a> within a call to <a href="#methods-jquery-prototype-method-ariaclick"><code>&lt;jQuery&gt;.ariaClick()</code></a>, which can be done directly and with greater flexibility.
191191
</p>
192192

193-
#### Since:
193+
#### History:
194194

195195
* `v2.0.0`: Introduced.
196196
* `v2.29.0`: Deprecated.

0 commit comments

Comments
 (0)