* Add usemap attribute to image macro
Allow for a usemap attribute on the $image macro call which is passed through to the resulting img tag. This makes the use of HTML image maps [1] possible.
[1]: <https://www.w3schools.com/html/html_images_imagemap.asp>
* Document new usemap attribute in ImageWidget
* Update version docs
---------
Co-authored-by: Jeremy Ruston <jeremy@jermolene.com>
* add archive HTML wikis, add index.html + css
* only build archive for release version
* tested and add more docs
* fix indent
* fix spacing
* add $TW5_BUILD_OUTPUT_ARCHIVE env variable for testing
* use $TW5_BUILD_OUTPUT_ARCHIVE to check if archive should be built
* use TW5_BUILD_ARCHIVE as requested
* Simplify Permalink/Permaview URLs
* Fix lint warnings by removing arrow functions
* Remove commented sample code
* Remove post-ES5 code
* Add many more allowable non-percent-encodedcharacters
* Fix more ES6+ stuff, add end-of-sentence padding character.
* Fix to match standards
* Move the new code from boot to util
* Change from custom map/filter to $tw.utils.each
* Make `each` blocks multi-line
* Move the permalink handling to its own file
* Remove auto-navigation
* Revert "Remove auto-navigation"
This reverts commit ca1e5cf387.
* Add unit tests for negative indexes in json ops
* Allow negative indexes in JSON operators
Negative indexes will be treated as counting from the end, so -1 means
last item of the array, -2 means next-to-last item, and so on.
* Add documentation for negative indexes
* Add support for running in-browser tests via playwright in GitHub CLI
* `ci.yml` was updated to store the report so that it can be inspected on failure
* `ci-test.sh` was added as an expansion to `test.sh` which installs and runs playwright
* `playwright.spec.js` does the actual verification of opening the test TW edition in browser, waiting for the tests to finish and then verifying it has indeed passed
* `playwright.config.js` Playwrifht configuration
* Add support for running in-browser tests via playwright in GitHub CLI
* `ci.yml` was updated to store the report so that it can be inspected on failure
* `ci-test.sh` was added as an expansion to `test.sh` which installs and runs playwright
* `playwright.spec.js` does the actual verification of opening the test TW edition in browser, waiting for the tests to finish and then verifying it has indeed passed
* `playwright.config.js` Playwrifht configuration
* Fix file permissions for `ci-test.sh`
* Increased node version for github actions to support playwright
* Add installation of the required @playwright/test library during CI test execution
* Fix encodebase64 and decodebase64 filters
The documentation for encodebase64 says that the input is treated as
binary data, but in fact the input is being treated as text data, with
an extra UTF-8 encoding step being performed first.
Likewise, the decodebase64 documentation says that it outputs binary
data, but in fact it will do a UTF-8 decoding step before producing
output, which will in fact garble binary data.
This commit changes the behavior of encodebase64 and decodebase64 to
match what the documentation says they do. It also adds an optional
`text` suffix to both filters to keep the current behavior.
Finally, an optional `urlsafe` suffix is added to both filters to allow
them to use the "URL-safe" variant of base64 (using `-` instead of `+`
and `_` instead of `/`).
* Try to fix failing test
Turns out a little more than this is going to be needed.
* Fix binary base64 encoding, including unit tests
* Update base64 filter documentation
* Can't use replaceAll, too new
Have to use String.replace with a global regex instead
* Replace uses of window.btoa() in rest of code
Since window.btoa() is not available under Node.js, we'll replace all
uses of it with the $tw.utils.base64encode() function that now works
correctly for binary data.
* Add link to UTF-8 glossary definition at MDN
* Passing test
* Failing test
* Fix test
It still fails, but now fails correctly
* Fix refreshing transcluded functions (#7755)
We store the previous result of the filter function and recalculate it
when the transclude widget needs to be refreshed, refreshing the widget
if the result is different.
---------
Co-authored-by: Jeremy Ruston <174761+Jermolene@users.noreply.github.com>
Co-authored-by: Robin Munn <rmunn@pobox.com>
* Initial Commit
* Update docs
* Add support for elseif blocks
* Another test
* WIP
* Change from `{%if%}` to `<%if%>`
See discussion here - https://talk.tiddlywiki.org/t/proposed-if-widget/7882/64
* Don't use the widget body as the template if a list-empty widget is present
See discussion here - https://github.com/Jermolene/TiddlyWiki5/pull/7710#issuecomment-1717193296
* List widget should search recursively for list-template and list-empty
* Allow block mode content within an if/then/else clause
* Update docs
* Add from-version tag to docs
* Change favicon format from ICO to PNG
* Revert renaming `./favicon.ico`
Keep the backwards compatible file name `./favicon.ico` (though they will actually be in PNG format now).
* Add SVG template for creating favicons
Add `favicons.svg`, the template for creating the current PNG favicons, along with some helpful information about it in `favicons.svg.md`.
* Add source Inkscape SVG
Add source Inkscape SVG as an example of image tiddler in tw-com
* Add failing test for list widget with counter-last
The failing test appends a value to a list without changing the rest of
the list, and the counter-last value doesn't get updated correctly when
that happens. Also added another test, which passes, testing removing
the last item of the list, just in case of a regression.
* Improve unit tests for counter-last list widget bug
The unit tests were looking very similar to each other, so I factored
out the common code and made them into simple data-driven tests.
* Fix bug where counter-last fails in list widget
The only scenario that was failing was when counter-last was used, but
the list was strictly appended to with no other changes made. The one
unit test that was failing now passes with this fix.
* Improve bugfix to list widget counter-last
Now we only refresh the last item if it was truly necessary.
Currently I'm building these files myself for use on tiddlyhost.com.
I'm thinking it would be nicer if they were built and distributed by
TiddlyWiki's own build automation, so this is a step towards that.
The two new files that are created, "empty-external-core.js" and
"tiddlywikicore-<version>.js" will appear alongside the existing
"empty.html" and "empty.hta" when the TiddlyWiki site is deployed.
I noticed these inconsistencies in the tiddlywiki.info json files
while working on the previous commit and thought I'd fix them for
the sake of neatness and tidiness.
This contains whitespace changes only, so git diff -b should be
empty.
Includes:
- Remove some trailing whitespace in several files
- Fix incorrect indenting in one file
- Add end of file newlines in two files