Commit Graph

41 Commits (master)

Author SHA1 Message Date
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
Kyle Daruwalla 215857e8dd ColorCodes: Triggers on any query ending in "color <name>" (#4220)
* ColorCodes: Triggers on any query ending in "color <name>"

- Added logic to prevent triggering when excess words are involved in
  the sentence that are not expected

Fixes #3294

* - Fixed regex for filler words to be simpler
- Fixed filler count return statement by removing the double negative

* Simplified regex to catch filler words

* Fixed whitespace changes

* Added more tests for when the IA should not trigger. Existing tests already sufficiently cover when the IA should trigger.
2017-07-12 07:19:17 -04:00
Ben Moon 83b9bbd6b7 Fix newline at end of file 2016-05-16 14:19:39 +01:00
Ben Moon 5f85cf4121 Update Goodies to use Test::Deep
* Ensure Test::Deep is imported.

* Replace '-ANY-' with ignore()

* Replace regexes with re(...)
2016-05-16 14:07:57 +01:00
Zach Thompson 73d8f72fc0 Remove id/name from Perl modules and tests 2016-03-18 11:49:33 -06:00
Mailkov 5110305089 Issue #1163 - Check the content of the structured answer 2015-12-03 15:14:21 +00:00
Mailkov 460198266a Issue #1163 - fix name on ColorCodes 2015-12-01 18:27:04 +00:00
Mailkov 0d6efe57ec Issue #1163 - Convert ColorCodes to use template 2015-12-01 15:58:04 +00:00
Rob Emery e794e937e5 ColorCodes: Greyscale values no longer display complementary and analogous colours 2015-08-29 21:46:51 +01:00
Rob Emery 1335d178f0 ColorCodes: Adding failing test that black should not display complementary colours etc 2015-08-29 21:16:46 +01:00
Matthew Ramina 9c9c0b191f ColorCodes: add support for queries like <color> to <type> 2015-07-13 16:38:48 -04:00
Zaahir Moolla a0a34e2eef Fix ColorCodes Test 2015-07-08 15:23:24 -04:00
Matthew Ramina 28f7b77f43 ColorCodes: forgot tests :/ 2015-03-11 20:25:14 -04:00
Matthew Ramina 04ed31bec2 ColorCodes: better dark mode 2015-03-06 16:31:45 -05:00
Matthew Ramina b4a8753257 ColorCodes: whoops, tests 2015-03-05 12:19:02 -05:00
Rob Emery 35e8741d17 ColorCodes: Updating tests with new analogous colours 2015-02-08 17:15:29 +00:00
Rob Emery 8b6f7a44b3 ColorCodes: making hex codes clickable 2015-02-08 16:52:00 +00:00
Rob Emery 0fc9fe2776 ColorCodes: separator colour to: d0d0d0 & attribution 2015-02-08 16:27:18 +00:00
Rob Emery 3ae452ce39 ColorCodes: Fixing Hex in links 2015-01-31 02:06:00 +00:00
Rob Emery 7860b05012 ColorCodes: Adding complementary class into test output 2015-01-20 22:49:33 +00:00
Rob Emery 55b7dd1ff3 ColorCodes: Tests update for new html 2015-01-20 21:03:58 +00:00
Rob Emery 292e463f69 ColorCodes: Layout fixes and tweaks 2015-01-09 20:40:11 +00:00
Rob Emery 84730aed62 ColorCodes: Adding analogous and complementary output to text output 2014-12-27 22:30:14 +00:00
Rob Emery 97fe2e6913 ColorCodes: Breaking markup out into columns 2014-12-27 22:14:18 +00:00
Rob Emery 4afef13155 ColourCodes: Adding output formats like mocked up; updating tests 2014-12-27 18:34:21 +00:00
Rob Emery 3ee723875f ColourCodes: Adding alpha to display 2014-12-17 21:43:23 +00:00
Rob Emery e4d72f02a0 ColorCodes: Updating tests with correct output 2014-12-11 21:20:31 +00:00
Rob Emery d7c2383292 ColorCode: Adding failing test for rgba 2014-12-11 14:24:48 +00:00
Matt Miller a6a5d9ffbb ResistorColors/ColorCodes: update new selector names.
Changed to be a bit less generic at the behest of @russellholt
2014-09-11 17:37:13 -04:00
Matt Miller eb93246657 ColorCodes.t: test to see if we styled in the correct background.
With the full test below of where the background styling takes place,
this should be sufficient to ensure that we haven't made any wildly
wrong code changes.
2014-09-10 18:33:05 -04:00
Matt Miller 4a24d5165b ColorCodes: move from inline css 2014-09-10 17:33:32 -04:00
Matt Miller 7ace24facb ColorCodes: rough in a different HTML template.
Real templates are coming, but this is a step.
2014-09-09 18:54:38 -04:00
Matt Miller bc7e87be22 ColorCodes: treat "code" as semantic noise.
We want to allow the string "code" to be used in the triggering query,
but we want it to have no effect on how the query is understood
or processed.

Addresses issue #454.
2014-08-28 17:25:19 -04:00
Matt Miller 015107ec37 ColorCodes: eliminate NBS_ISCC sub dictionaries from lookups.
By their own documentation, the NBS submodules contain idiosyncratic
color names which are not well-suited to a general purpose color code
search.

In particular, NBS_ISCC::M contains a color called 'email' which caused
a confusing result for 'HTML email'.

The main NBS colors are included because they seem reasonable enough as
color names.

This fixes #490 and possibly partially addresses #454 and #442, I guess.

Also includes some testing ideas from @mintsoft.
2014-06-28 19:10:37 +08:00
Michael Smith cc47172f0e Update colorcodes to handle inverse/negative colours 2013-11-30 14:15:51 -07:00
Jag Talon e7b798f7e3 Changed the test file of the ColorCodes plugin. 2013-03-20 19:33:06 -04:00
Michael Smith daff0a57d9 fix ColorCodes tests 2012-06-16 13:23:12 -06:00
Michael Smith e84306c7ea handle percents and short hex colors (#000), make output copyable 2012-06-03 11:19:48 -06:00
Michael Smith 09e8ad8dfa handle #000000-style colorcodes and add tests 2012-06-03 08:36:02 -06:00
Michael Smith 0572799079 Add ColorCodes goodie 2012-05-28 18:04:43 -06:00