Skip to content

Commit

Permalink
RELEASE: v2.33.4
Browse files Browse the repository at this point in the history
## Changelog:

* Updated the HTML parser to handle custom elements.
  • Loading branch information
tmedwards authored Nov 13, 2020
2 parents 9f81847 + de97925 commit 05ea5a2
Show file tree
Hide file tree
Showing 33 changed files with 509 additions and 490 deletions.
2 changes: 1 addition & 1 deletion dist/format.js

Large diffs are not rendered by default.

58 changes: 29 additions & 29 deletions docs/api/api-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The `Config` object controls various aspects of SugarCube's behavior.

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

#### Since:
#### History:

* `v2.28.0`: Introduced.

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

#### Since:
#### History:

* `v2.28.0`: Introduced.

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

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

#### Since:
#### History:

* `v2.0.0`: Introduced.

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

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.

#### Since:
#### History:

* `v2.0.0`: Introduced.

Expand Down Expand Up @@ -112,7 +112,7 @@ Determines whether the [`<<if>>` macro](#macros-macro-if) returns an error when
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.
</p>

#### Since:
#### History:

* `v2.0.0`: Introduced.

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

#### Since:
#### History:

* `v2.0.0`: Introduced.

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

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.

#### Since:
#### History:

* `v2.33.1`: Introduced.

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

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

#### Since:
#### History:

* `v2.32.0`: Introduced.

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

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.

#### Since:
#### History:

* `v2.13.0`: Introduced.

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

#### Since:
#### History:

* `v2.0.0`: Introduced.

Expand Down Expand Up @@ -265,7 +265,7 @@ Config.passages.descriptions = function () {

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

#### Since:
#### History:

* `v2.0.0`: Introduced.

Expand All @@ -285,7 +285,7 @@ Determines whether rendering passages have their leading/trailing newlines remov
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.
</p>

#### Since:
#### History:

* `v2.19.0`: Introduced.

Expand All @@ -309,7 +309,7 @@ Does not affect <code>script</code> or <code>stylesheet</code> tagged passages,
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>.
</p>

#### Since:
#### History:

* `v2.30.0`: Introduced.

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

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

#### Since:
#### History:

* `v2.0.0`: Introduced.

Expand All @@ -348,7 +348,7 @@ Determines whether outgoing passage transitions are enabled. Valid values are t
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.
</p>

#### Since:
#### History:

* `v2.0.0`: Introduced.

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

#### Since:
#### History:

* `v2.0.0`: Introduced.

Expand Down Expand Up @@ -434,7 +434,7 @@ Determines whether the autosave is created/updated when passages are displayed.
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.
</p>

#### Since:
#### History:

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

Sets the story ID associated with saves.

#### Since:
#### History:

* `v2.0.0`: Introduced.

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

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.

#### Since:
#### History:

* `v2.0.0`: Introduced.

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

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.

#### Since:
#### History:

* `v2.0.0`: Introduced.

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

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.

#### Since:
#### History:

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

Sets the maximum number of available save slots.

#### Since:
#### History:

* `v2.0.0`: Introduced.

Expand All @@ -601,7 +601,7 @@ Sets the `version` property of saves.
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.
</p>

#### Since:
#### History:

* `v2.0.0`: Introduced.

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

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.

#### Since:
#### History:

* `v2.11.0`: Introduced.

Expand All @@ -654,7 +654,7 @@ Determines whether certain elements within the UI bar are updated when passages
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.
</p>

#### Since:
#### History:

* `v2.0.0`: Introduced.

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

#### Since:
#### History:

* `v2.0.0`: Introduced.

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

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.

#### Since:
#### History:

* `v2.0.0`: Introduced.

Expand All @@ -727,7 +727,7 @@ Indicates whether SugarCube is running in test mode, which enables debug views.
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.
</p>

#### Since:
#### History:

* `v2.2.0`: Introduced.

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

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.

#### Since:
#### History:

* `v2.0.0`: Introduced.

Expand Down
16 changes: 8 additions & 8 deletions docs/api/api-dialog.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Appends the given content to the dialog's content area. Returns a reference to
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.
</p>

#### Since:
#### History:

* `v2.9.0`: Introduced.

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

Returns a reference to the dialog's content area.

#### Since:
#### History:

* `v2.0.0`: Introduced.

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

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

#### Since:
#### History:

* `v2.0.0`: Introduced.

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

Returns whether the dialog is currently open.

#### Since:
#### History:

* `v2.0.0`: Introduced.

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

#### Since:
#### History:

* `v2.0.0`: Introduced.

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

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

#### Since:
#### History:

* `v2.0.0`: Introduced.

Expand Down Expand Up @@ -168,7 +168,7 @@ Renders the given [markup](#markup) and appends it to the dialog's content area.
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.
</p>

#### Since:
#### History:

* `v2.9.0`: Introduced.

Expand All @@ -190,7 +190,7 @@ Dialog.wiki("Cry 'Havoc!', and let slip the //ponies// of ''friendship''.");
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.
</p>

#### Since:
#### History:

* `v2.0.0`: Introduced.
* `v2.29.0`: Deprecated.
Loading

0 comments on commit 05ea5a2

Please sign in to comment.