Merge branch 'substring-answers' of https://github.com/dirtbags/moth into substring-answers

This commit is contained in:
John Donaldson 2020-03-10 21:34:26 +00:00
commit a0bd8b92b3
2 changed files with 6 additions and 1 deletions

View File

@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased] ## [Unreleased]
### Changed
- We are now using SHA256 instead of djb2hash
### Added ### Added
- URL parameter to points.json to allow returning only the JSON for a single - URL parameter to points.json to allow returning only the JSON for a single
team by its team id (e.g., points.json?id=abc123). team by its team id (e.g., points.json?id=abc123).
@ -13,6 +15,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- add_script_stream convenience function allows easy script addition to puzzle - add_script_stream convenience function allows easy script addition to puzzle
- Autobuild Docker images to test buildability - Autobuild Docker images to test buildability
- Extract and use X-Forwarded-For headers in mothd logging - Extract and use X-Forwarded-For headers in mothd logging
- Mothballs can now specify `X-Answer-Pattern` header fields, which allow `*`
at the beginning, end, or both, of an answer. This is `X-` because we
are hoping to change how this works in the future.
### Fixed ### Fixed
- Handle cases where non-legacy puzzles don't have an `author` attribute - Handle cases where non-legacy puzzles don't have an `author` attribute
- Handle YAML-formatted file and script lists as expected - Handle YAML-formatted file and script lists as expected

View File

@ -215,8 +215,8 @@ function answerCheck(e) {
possiblyCorrect(answer) possiblyCorrect(answer)
.then (correct => { .then (correct => {
document.querySelector("[name=xAnswer").value = correct || answer
if (correct) { if (correct) {
document.querySelector("[name=xAnswer").value = correct
ok.textContent = "⭕" ok.textContent = "⭕"
ok.title = "Possibly correct" ok.title = "Possibly correct"
} else { } else {