Commit Graph

3439 Commits (master)

Author SHA1 Message Date
Zaahir Moolla dd6d184da7
Fix timezonetime (#4712)
* Disable caching of result

* Cleanup whitespace
2019-05-30 23:13:47 -04:00
Zaahir Moolla 28d2459d4b
Factors & Prime Factors: Limit input size to <= 1M (#4669)
* Limit input size to Factors IA

* Limit input size of PrimeFactors Goodie
2018-11-28 13:02:26 -05:00
Zaahir Moolla 92a5c59213
Conversions fix (#4506) (#4580)
* conversions fix

* correction
2018-01-29 22:51:36 -05:00
Rohit Upadhyay 9c5af71177 Fixes #4520, added gigapascal to pressure units to fix broken unit (#4522)
* fixed overtriggering in Game2048

* Added two more tests to help fix issue #4473

* Added regex guard in handle function to fix #4473.

* modified regex guard for #4473

* Added a test to t/Game2048.t

* Removed trailing comma.

* Conversions: Added Gigapascal to pressure units #4520

* Update Conversions.t

* Update Conversions.t

* Added test for Gbar for conversions goodie
2018-01-29 22:35:54 -05:00
Pratheev cbd6dad6c1 Conversions: JS error (#4551) (#4557)
* Conversions: JS error

* Conversions: JS error (#4551)

* Conversions: JS error (#4551)

* Conversions: JS error (#4551)
2017-12-26 21:18:25 -05:00
tossj e6b1b62739 Conversions: Changed "=" to act like "to" in implicit conversions (#4553) 2017-12-18 11:14:49 -05:00
Zaahir Moolla 19a6a9a6eb Fix tests for Perl 16 and 26 2017-11-07 15:53:25 -05:00
Eric Johnson e2981a3cf1 Eric/perl 5.26.0 (#4529)
* perl-5.26.0: Handle NaN

* perl-5.26.0: regexp escaping

* fix typo

* bump travis to perl-5.26.0

* perl-5.26.0: unicode changed

* revert to perl5.16

* cache perl-5.26/lib
2017-11-07 13:58:30 -05:00
Nalin Bhardwaj 4768a4d882 fix file extension regex (#4510) 2017-09-28 18:40:31 +01:00
Zaahir Moolla 7b2bcd12d4 DuckDuckGo Answers: Update links to DDH.com and Forum (#4509)
* Update links to DDH.com and Forum

* Small wording fix

* Remove failing tests
2017-09-25 12:53:53 -04:00
gargaml 549ee53266 Roman numerals (#4413)
* First shot at improving roman numeral IA.

Added a new converter.
Added new default settings.
Added some tests.

* Added un upper bound on arabic numbers.

* Remove some typo…

* Added some new triggers.
Allowed uncorrect roman number to load the UI anyway.
Fixed a test.

* Added new triggers.
Fixed regular expressions involved in the UI configuration.
Added new tests.

* Renamed file.

* Variables defined outside the handle function.

* Modified template.

* Init logic now runs only once.

* Added a prefix to ensure there are no collisions.

* Fixed tests.

* Added more agressive validation on user inputs.

* Fixed a test case for aggressive validation.  The ia doesn't trigger is
the input is invalid with respect to roman numeral system.

* Removed forEach operation (replaced with a for loop).

Removed firstLetterUpperCase in favor of DDG util capitalize.

* Fixed design on narrow screens.

* Added a new test (roman man => undef).

* Fixed regular expressions to avoid displaying if roman or arabic is used
without numbers.

* Added warnings when inputs are out of range.

* Added a state variable for warnings.

* Empty if removed.

* Fixed regexps.

* Fixed subtitle.

* Css fixed. Both for mobile and desktop.

* Fixed tests.

* Use horizontal layout on desktop, vertical on mobile
2017-09-19 11:29:52 -04:00
tossj 2287be95c3 TextConverter: Sorted static trigger words into to and from categories (#4490)
* TextConverter: Sorted static trigger words into to and from categories

* TextConverter: Moved to and from trigger words out of handle
2017-09-17 21:11:06 +01:00
PJ Hampton 6b16ccdcd9 CalcRoots: Fixes triggering on words. (#4489)
* Fixes triggering on words.

* Fix hard indent.

* fix indent
2017-09-15 18:09:08 -04:00
tossj fc7c03331d Binary: Encoded query string into UTF-8 before binary conversion (#4486) 2017-09-14 10:37:11 -04:00
Original Fannibal efb39d76e1 DaysBetween: Fix #2844 Improve triggering (#4464)
* Add "Days until" as a trigger

* Added tests

* Added test for specific date in the future

* Added anchors

* Updated test for fixed date in the future
2017-09-13 16:51:36 -04:00
tossj 27868745d5 Timezone Coverter: Removed friendly "Noon" and "Midnight" times from TimezoneConverter IA (#4481)
* Removed friendly "Noon" and "Midnight" times from TimezoneConverter IA

* Add "Noon" and "Midnight" alongside numerical time
2017-09-12 09:46:40 -04:00
PJ Hampton 4783cdef4d Fix micro symbol issue. (#4484) 2017-09-11 16:35:26 -04:00
PJ Hampton 95214cc055 Calculator: Divide bug (#4483)
* Add edge case.

* Fix rouge regex.
2017-09-11 15:57:42 -04:00
Rob Emery 48a1f3348e ColourCodes: Fixing handling on RGB with values > 0 (#4480)
* ColourCode: Rough failing test for #4479; not correct test-case but at least not ffffff

* Updating test to be bang-on-accurate

* ColourCodes: Fixes #4479
2017-09-07 10:10:49 -04:00
Rob Emery 85f28710a6 Colourcodes: new query patterns (#4453)
* ColorCodes: Cleaning out comments and some minor refactoring

* ColorCodes: Tabs -> spaces and failing test for #190

* ColorCodes: We need more control over the actual query handling so I want the raw query

* ColorCodes: red: \d green: \d blue: \d queries now work

* ColorCodes: refactoring out the need for capturing the inversion words

* ColorCodes: Removing unnecessary hash

* ColourCodes: Attempting to push as much limiting and protection as early as possible

* ColourCodes: Layout tinkering

* ColorCodes: Matches can be wider now we're planning to use named captures

* ColorCodes: Adding named captures for loop removal

* ColorCodes: Converting to use just the named captures; tests failing

* ColorCodes: need to map the type for cmyk

* ColorCodes: Layout

* ColorCodes: RGBA can be implemented as an alias now in the regex :D

* ColorCodes: Will now respond to bluishblack html not just html bluishblack!

* ColorCodes: This regex case seems to make no difference to passing tests or query patterns

* ColorCodes: Types are case sensitive!

* ColorCodes: Using the matches we can construct a colour without hacking the input query

* ColorCodes: We can use the matches for detecting inversion

* ColorCodes: Rearranging

* ColorCodes: Removing unused

* ColorCodes: Bit of cleaning

* ColorCodes: Don't need to do this in the else anymore, we can do it before!

* ColorCodes: show -> to flip the ternary

* ColorCodes: Adding tests for #3758

* ColourCodes: Switching to query_lc

* ColourCodes: Regex refactor
2017-09-05 19:54:36 -04:00
Zach Thompson 781856b4e0 SolarSystem: Use unicode superscripts, multiplication symbol (#4050)
* Use unicode superscripts, multiplication symbol

* Update tests with new unicode

* Put trans in sub
2017-09-05 17:43:43 -04:00
Rohit Upadhyay 50bb72dff7 Game2048: Fixed overtriggering (#4473)
* fixed overtriggering in Game2048

* Added two more tests to help fix issue #4473

* Added regex guard in handle function to fix #4473.

* modified regex guard for #4473

* Added a test to t/Game2048.t

* Removed trailing comma.
2017-09-05 14:00:32 -04:00
jc86035 687f7de9f2 Conversions: Add light years, astronomical units, parsecs (#4438)
* Update conversions.js

* Update conversions.js

* Update conversions.js

* Update conversions.js

* Update triggers.yml

* Update triggers.yml

* Add some tests for new units

* ce

* Update Conversions.t
2017-09-02 10:54:22 +01:00
PJ Hampton 74fb241903 Fix over triggering on dates. (#4463) 2017-08-29 15:33:26 -04:00
Rob Emery a46679a254 LHC: Limiting overtriggering (#4462)
* HasLHC: Adding failing tests for improper trigger type

* LHC: We want start to limit overtriggering and only if there isn't other information in the query
2017-08-28 18:09:06 -04:00
Ben Moon 9b128b8dbe Shuffle: Update to use Parse::List Role (#3619)
* Update list parsing/formatting to use role

* Remove tests that duplicate role testing
2017-08-28 18:06:55 -04:00
PJ Hampton d0b3a242db Fix overtriggering. (#4457) 2017-08-28 12:14:07 -04:00
Taite Clark 242793b659 New LHC Apocalypse Checker Instant Answer (#3597)
* Completed perl file, delivering simple response

* The start of a test file

* finish test file, add plain text result.
2017-08-28 16:32:56 +01:00
PJ Hampton 368bab09c0 JS Minifier: Added CSS support, Added Beautify support (#4154)
* Add css support for js minifier.

* Add support for prettifying.

* Fixed tests.

* Removed flag code.

* update triggers to include prettify for css.

* Add case insensitivity.

* Remove .fifty from html
2017-08-28 16:14:21 +01:00
Philip Kirkbride a6bbd9c176 Phonetic: Convert to structured (#4354)
* Make phonetic goodies structured

* add title/subtitle format

* switch title and subtitle

* fix tests
2017-08-27 17:40:54 +01:00
Aditya Tandon a8b453d410 Geometry: Adds geometry of cylinder and cone (#4144)
* adds geometry of cylinder and cone

correcting the formula

updating test

* tweaking cone svg a bit

* tweaking fil surface and fill volume svg

slight nit fix

switches class name to stroke special

updates test

* updates test

* syntax fix
2017-08-25 11:58:30 +01:00
Philip Kirkbride 6774080ae7 make Loan return a structured answer (#4358) 2017-08-24 00:27:28 +01:00
Philip Kirkbride 3105bc1be5 IDN: Structured Answer (#4356)
* idn structured answer, remove tabs

* make returned answer more readable
2017-08-24 00:23:50 +01:00
122131 57033cca97 Minecraft: added minecraft 1.12 recipes (#4271)
* 1.12 changes

* fix image extension

* fix regex

* Fix tests

I made a PR after this one which made this goodie triggered when the British spelling of colour is used.

I added these two tests, which aren't compatible with your PR. I'm pushing these changes which should fix the test failures.
2017-08-23 23:59:04 +01:00
Nalin Bhardwaj 894ef122c0 Timer: Triggering fixes (#4446)
* Adds join-word of

* Stops triggering on time calculations

* Comment fixes
2017-08-22 20:15:25 +01:00
Lev Kravinsky 4bf20c33b2 Geometry: Add Triangle Area (#4287)
* add triangle objectInfo and svg

* add tests for triangles & fix formula variable name

* add perimeter to triangle

* add height to triangle svg
2017-08-22 20:08:35 +01:00
PJ Hampton ad955d8469 Remove legacy IPS code. (#4451) 2017-08-21 16:09:09 -04:00
PJ Hampton 27e75cf8df Removed legacy HKDK. (#4448) 2017-08-21 16:08:54 -04:00
PJ Hampton dea0663089 Remove legacy DHL code. (#4450) 2017-08-21 16:08:15 -04:00
PJ Hampton c932b6a7a5 Remove legacy laser ship code. (#4452) 2017-08-21 16:07:59 -04:00
PJ Hampton 138cfc5959 Calculator: patch overtriggering (#4439)
* Fix overtrigger on phone numbers.

* Prevent car model overtriggering.

* Stop ambigious overtriggering.

* Add extra test (mintsoft request)

* More handling of car searches

* Strip trailing spaces
2017-08-21 14:44:20 -04:00
Tiago Danin 648588ea03 Available HTTPS (in DuckDuckGo, DDD and Freenode) (#4444) 2017-08-20 21:20:40 +01:00
Philip Kirkbride 171ef55def Pi: correct parsing for max length (#4441)
* Pi: correct parsing for max length

* small style fix

* fix for pi 1000
2017-08-19 23:21:05 +01:00
Philip Kirkbride 192047914c sumOfNaturalNumbers: Convert to structured answer (#4255)
* convert sumOfNaturalNumbers to structured answer

* cleaned up syntax
2017-08-17 20:37:02 +01:00
Nalin Bhardwaj c11be84d6a Music Chords Diagrams: Fixes/improves triggering (#4085)
* Fixes regex to correctly find values

* Adding multiple naming to instruments

* Fixes #3386

* Adds more sharp/flat aliases for ukulele

* Remove debug print

* Multiple whitespace matching

* Adding support for tabs, chords

* Adding tests
2017-08-15 23:40:48 +01:00
Mariano Simone fe0c18f729 Convert unidecode to use template (#4396)
This is part of #1163
2017-08-15 03:08:36 +05:30
PJ Hampton e31c2260f0 Add micron alias. (#4416) 2017-08-10 15:38:27 -04:00
Zaahir Moolla 96bfdab046 Revert "Roman numerals (improvements) (#4402)" (#4412)
This reverts commit 026279bb6a.
2017-08-09 12:46:46 -04:00
gargaml 026279bb6a Roman numerals (improvements) (#4402)
* First shot at improving roman numeral IA.

Added a new converter.
Added new default settings.
Added some tests.

* Added un upper bound on arabic numbers.

* Remove some typo…

* Added some new triggers.
Allowed uncorrect roman number to load the UI anyway.
Fixed a test.

* Added new triggers.
Fixed regular expressions involved in the UI configuration.
Added new tests.
2017-08-09 11:59:17 +03:00
PJ Hampton 27c5c308de Conversions: Add case sensitivity. Fix ambiguity collisions (#4406)
* Check in work.

* Fix casing ambiguity.

* Fix ambiguity selection.

* break out of outer loop.

* fix YAML
2017-08-08 16:37:13 -04:00