Commit Graph

4672 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
Eric Johnson c5f91f9f51
Added whitespace to test auto release (#4694) 2019-02-21 10:39:07 -05: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
tossj e6b1b62739 Conversions: Changed "=" to act like "to" in implicit conversions (#4553) 2017-12-18 11:14:49 -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
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
Zaahir Moolla 4adee0fdf4 fix redeclared variable 2017-09-11 16:55:43 -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
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
Rob Emery a2b28cba96 AltCalendars: keys on ref is fatal under perl 5.24 (#4418) 2017-08-25 13:13:58 -04:00
Rob Emery 237fd9fa46 Unicode: Fixing 5.24 upgrade -- Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/^ \s* (?:U \+?|\\(?:u|x{ <-- HERE (?=.*}))) (?<codepoint> [a-f0 (#4427)
-9]{4,6})}? \s* $/ at lib/DDG/Goodie/Unicode.pm line 12
2017-08-25 12:46:36 -04: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
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 037aceb53c Removes canada post. (#4449) 2017-08-21 16:08:37 -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
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
Rob Emery b7de67c5bd CssAnimations: keys on scalar is forbidden under perl 5.24 (#4419) 2017-08-19 16:10:44 +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
Yashhwanth Ram 2f9fe43d2d Pi : Fix bug and Improve IA (#4217)
* Add more digits to Pi to make it 1000

* Fix CSS to display all digits of Pi requested

* See if this works for you.
2017-08-17 20:12:40 +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
Dragomir Ioan b34a479780 Passphrase, Password: Implemented secure random (#4320)
* Passphrase, Password: Implemented secure random

* Passphrase, Password: Simpler variant of the secure random function

* Passphrase: Removed the initial secure random function

* Passphrase: moved the random generator to its own `sub`
2017-08-14 11:29:20 -04:00
Rob Emery 7b0f4c1fa3 Tips: Smartmatch (~~) is experimental, it is advised to not use it until the behaviour is better defined : http://search.cpan.org/dist/perl-5.18.0/pod/perldelta.pod#The_smartmatch_family_of_features_are_now_experimental (#4424) 2017-08-14 10:06:37 +01:00
Rob Emery e41b5cc966 PrimeFactors: there appears to be an extra character in the tr/// ? (#4426) 2017-08-14 10:05:04 +01:00
Rob Emery f6c8ca8afa Geometry: keys on hashref is fatal under perl 5.24 need to deref into a hash first (#4415) 2017-08-10 12:36:22 +01:00
Zaahir Moolla 96bfdab046 Revert "Roman numerals (improvements) (#4402)" (#4412)
This reverts commit 026279bb6a.
2017-08-09 12:46:46 -04:00