- 17 Jan, 2017 1 commit
-
-
Leon Arnott authored
This caused various expressions like (set: $a to $a < $y) to break. Fixes #68. Fixes #69.
-
- 10 Dec, 2016 1 commit
-
-
Leon Arnott authored
Also added a `make format` Makefile task to round out the offered tasks. Closes #62.
-
- 03 Dec, 2016 1 commit
-
-
Leon Arnott authored
This fairly obvious combination, which directly maps to (but currently doesn't bootstrap) the default sidebar's undo button, is now provided.
-
- 01 Dec, 2016 1 commit
-
-
Leon Arnott authored
This, along with a forthcoming (redo:) macro (which, in order to be used correctly, would require a (future:) macro, I guess), would allow the current default sidebar to be bootstrapped (constructed anew) from Harlowe code. Also changed the CSS of <html> such that its font declaration is now on <tw-story>, and fixed the CSS of <tw-error>s to make them white-on-black alongside the rest. (I may revise the latter some more to make it work when black-on-white is being used.)
-
- 30 Nov, 2016 1 commit
-
-
Leon Arnott authored
I've wanted to do this for a long time. I feel like white-on-black is the superior default for Twine, and was so during Twine 1, for a few reasons - black suggests a greater degree of intimacy, away from the "public" space of the white-on-black web, and invites more personal writing. Instructions for changing it back using (enchant:) are in the update notes. (Yes, I'm aware (enchant:) still needs to be documented.)
-
- 26 Nov, 2016 1 commit
-
-
Leon Arnott authored
This makes it compatible with a copy of Harlowe 1.2.3 in the same TwineJS program. Also tweaked two documentation lines.
-
- 21 Nov, 2016 1 commit
-
-
Leon Arnott authored
The addition of "each" lambdas was the final piece of this puzzle - expressing which temp variable to loop over in an unambiguous and readable syntactic way.
-
- 19 Nov, 2016 1 commit
-
-
Leon Arnott authored
The "each" keyword is a lambda "clause" that simply sets the lambda's subject, but, importantly, it allows one to create a lambda with no actual clauses. Formerly, such a lambda would be syntactically identical to (and unable to be disambiguated from) a plain temp variable. This allows future macros (such as a possible (loop:) macro) to use lambdas that iterate over the entire sequence, without specifying any specific selection or modification.
-
- 04 Nov, 2016 1 commit
-
-
Leon Arnott authored
Fixed a bug where setting custom values in a datamap returned by (passage:) would save the data in all subsequent identical (passage:) datamaps. This is for 2.0 only, since it's entirely likely some stories rely on these bugged semantics for storage. Also corrected a few documentation notes. Closes #60.
-
- 02 Nov, 2016 2 commits
-
-
Leon Arnott authored
-
Leon Arnott authored
This eliminates one instance of the non-character U+FFFE appearing in the output, which caused some servers to error. Also brought down d628d45dd90e's change from the 2.0.0 branch.
-
- 01 Nov, 2016 1 commit
-
-
Leon Arnott authored
Given that Babel inserts the pragma into its compiled output automatically, the pragmas aren't necessarily needed - however, for testing the raw ES6 in a browser without compilation, they still have to be there.
-
- 11 Sep, 2016 1 commit
-
-
Leon Arnott authored
Added the (hover-style:) changer macro, which allows passed style changers to only apply when hovering over the hook. I'm a little uncomfortable about its name (as compared to (text-style:)) and the specificity of only allowing style changers (which currently does not include (transition:)s) but I think it'll be fine, and could be safely expanded a little in future. Also fixed a bug where joining a changer, using "+" in markup, with a changer macro that produced an error, would suppress the error.
-
- 06 Sep, 2016 1 commit
-
-
Leon Arnott authored
Also fixed a bug where the wrong value would be given if passed the empty string as a search term (due to being passed to String#split()). Closes #8.
-
- 03 Sep, 2016 2 commits
-
-
Leon Arnott authored
-
Leon Arnott authored
Added "any" and "all" properties to sequentials, which are used for "all" and "any" comparison operations. These properties produce special, unstorable "determiner" values, which, when used as the object of "contains", "is in", or other comparison expressions, results in every element of the sequential being compared using the operation. This is, I feel, a better solution to simply adding "contains all" and "contains any" operators, in that it naturally expands to cover ">", ">=" and other non-set-related operations. Also fixes a bug (that didn't manifest until just now) where certain unstorable values could be stored if they were in storable data structures.
-
- 01 Sep, 2016 1 commit
-
-
Leon Arnott authored
This was important, I decided, to ensure consistency in changer concatenation between macros and passage markup. $changer + $changer2 now joins changers in both modes. Also added a "none" (text-style:) which, when added to other (text-style:) combined changers, removes their styles.
-
- 30 Aug, 2016 3 commits
-
-
Leon Arnott authored
Trying to use common incorrect operators will result in an error message telling you what the correct operator is. These incorrect operators current include =>, =<, gte, lte, gt, lt, eq, isnot, neq, are, x. (This, of course, means that JS variable names that equal these words are no longer passed through.)
-
Leon Arnott authored
Fixed a bug where datasets could contain (and compared) data structures by reference, in constructing, concatenating and subtracting. Also: * Fixed a bug where subtracting arrays was also subject to comparing data structures by reference. * Fixed a bug where subtracting non-subtractable values (such as booleans) wouldn't produce an error.
-
Leon Arnott authored
Also fixed bugs where certain error messages described values as "whatever this is" instead of treating them correctly.
-
- 29 Aug, 2016 1 commit
-
-
Leon Arnott authored
I spent years feeling rueful about adding this, as I'd felt it directly competes with the (replace:) macros' idiom. Lately, though, I've seen the merit in it, as a way of keeping revealed text inside the flow of the prose it is revealed inside, when said text is vital to the readability of the passage. I currently feel like this doesn't provide much way of expressing structure and relationship between hidden hooks and visible ones - no semantic way to convey that they form a list with only a single one visible, for instance, or that one builds upon the last, as with <<becomes>> and <<gains>> in Twine 1. But, future macros providing semantically clearer means of showing hidden hooks ((show-next:), (reveal-next:) or somesuch) can always be added.
-
- 24 Aug, 2016 1 commit
-
-
Leon Arnott authored
Also added to the test case HTML page a "ErrorMessages" global which collects all Harlowe error messages produced as a result of tests, so that they can be checked. Also decided to stick with the uncapitalised "boolean" for the data type in documentation and errors.
-
- 23 Aug, 2016 1 commit
-
-
Leon Arnott authored
I'm still not entirely sold on this decision, which is why it's currently undocumented, but here it is: you can now write (find: where it > 3) etc., and "it" will refer to the loop variable, even if elided. "it" also works when the variable is provided - (find: _item where it > 3). (What I'm hesitant about is that this is ultimately a new meaning for "it", similar to but not equivalent to previous uses where "it"'s value was always leftward and explicitly visible.) Also fixed/removed a few revision tests, and altered some documentation references to (datamap:), changing it to (dm:).
-
- 20 Aug, 2016 3 commits
-
-
Leon Arnott authored
This prevented a meaningful error message being displayed for "(print: 1st of -0.2)", for instance. Incidentally, this also indirectly changes the syntax highlighting for negative numbers - now, the - sign, if alongside the first digit, now is coloured the same as the rest of the number.
-
Leon Arnott authored
This involved adding some structural indirection to the ChangeDescriptor's newTargets property - instead of an array of HookSets or jQuerys, it's an array of {target, append} properties, tying the append method to the target.
-
Leon Arnott authored
This enables the "when stored, can work across passages" test for revision macros to finally pass. In practice, it means that the section used for HookSets' hook selection is determined by the consumer macro. As a result, Section.selectHook() is gone, and (somewhat frustratingly) HookSet.forEach() now takes a section as its first param, breaking symmetry with Array#forEach. While implementing this, HookSets' targets and newTargets were changed to no longer be stored as strings - only HookSet, jQuery collections and arrays thereof are used now. Also, as a necessity of these changes, HookSets no longer have a length, and can no longer be spread with "...". (But, neither of these had much point ever since they became unstorable).
-
- 18 Aug, 2016 1 commit
-
-
Leon Arnott authored
This allows the "can be composed" tests for these macros to be re-enabled. Also gave HookSets a TwineScript_is() method, allowing them to finally be compared by value using the "is" operator.
-
- 17 Aug, 2016 1 commit
-
-
Leon Arnott authored
Now, all code spans in the docs which occur outside of the "Passage markup" section will now use the macro mode for highlighting, rather than the markup mode. This means that identifiers and operators should be styled more accurately.
-
- 16 Aug, 2016 1 commit
-
-
Leon Arnott authored
Also fixed a bug where using (set:) to set a substring, when the given array of positions contained "length" (such as (set: $a's (a:1,"length")) to "foo")), wouldn't produce an error.
-
- 10 Aug, 2016 1 commit
-
-
Leon Arnott authored
Also corrected and added a few other lines elsewhere.
-
- 08 Aug, 2016 1 commit
-
-
Leon Arnott authored
This macro, designed primarily for use with lambdas, lets you iterate over a datamap and have access to its names and values easily, without needing to interleave (datanames:) and (datavalues:). Also: * Fixed a bug where lambdas couldn't iterate over values that consisted of datamaps, datasets, or any Harlowe-specific data. * Added some styling for "where", "via", "making" and "with" to the CodeMirror mode.
-
- 07 Aug, 2016 2 commits
-
-
Leon Arnott authored
-
Leon Arnott authored
-
- 04 Aug, 2016 1 commit
-
-
Leon Arnott authored
This pane displays the (currently just global) variables in the story, and should update them the moment they change, using VarRef event handlers. This still could do with a few more features, such as: a button to hide/show the pane, and of course the inclusion of temporary variables. Also: * Fixed some serious bugs in the debug mode's turns dropdown. * Added an on() event handler register to VarRef. * Error messages now refer to Booleans as "the Boolean value" rather than "the logic value". * Corrected a few documentation lines.
-
- 02 Aug, 2016 2 commits
-
-
Leon Arnott authored
-
Leon Arnott authored
Also specified that 1.2.3 requires jQuery 2.x.
-
- 01 Aug, 2016 1 commit
-
-
Leon Arnott authored
This includes a ] inside a hook, a } inside the collapsing markup, or any of the formatting markup's closing tokens immediately after an opening token. I still need to determine if the HTML comments markup should have this applied, too. Closes #55.
-
- 25 Jul, 2016 2 commits
-
-
Leon Arnott authored
jQuery 3 removes the 'context' property, which was used by the fix added in b0a5841edfa4. A survey leads me to believe, though, that using just desc.target instead of desc.target.context should work too. The situation I believe I was guarding against (the desc.target being detached from the DOM such that its containing <tw-collapsed> element is invisible) doesn't seem like it can actually occur.
-
Leon Arnott authored
Now, State has three event hooks which DebugMode uses to alter its view - forward, back and load - and the handlers DebugMode registers only do the minimum of DOM manipulation needed. Also fixed a bug in the "stores lots of data" test for (loadgame:).
-
- 21 Jul, 2016 1 commit
-
-
Leon Arnott authored
This element allows the current session's turn history to be viewed, and to navigate to a particular turn using the menu. Also: * Made the debug mode panel slightly smaller. * Brought forward the mathFilter change to (pow:) in e47bdd66af23. * Fixed the use of 'tilde' rather than 'grave' in the verbatim syntax documentation. * In the test suite HTML file, fixed the bug where the harlowe-css.css file was included twice.
-