Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce info string commands #56

Merged
merged 2 commits into from
Sep 19, 2018
Merged

Introduce info string commands #56

merged 2 commits into from
Sep 19, 2018

Conversation

hagenburger
Copy link
Owner

This prepares an API to create #19, #18, and #32. All those features will have very complex regular expressions and escaping. Therefore an API preparing those regular expressions and testing them centrally makes sense.

``` +commandname
``` +commandname=parameter
``` +commandname=parameter1,parameter2,parameter3

Every command in info strings consists out of:

  1. +
  2. Name of the command
  3. = (optional)
  4. A parameter (regexp, string, number, boolean, or null; optional)
  5. more paraters (comma-separated; optional)

Examples: See #19, #18, and #32

@hagenburger hagenburger added the enhancement New feature or request label Sep 17, 2018
@benevbright
Copy link
Collaborator

Nice work! Have seen briefly, but will look more tomorrow.

Copy link
Collaborator

@benevbright benevbright left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very complex. (for a beginner of javascript)
But surprisingly working well. 👍

lib/config.js Outdated
if (infoString === infoStringBefore) {
const spacePosition = infoString.indexOf(" ")
if (spacePosition !== -1) {
const unkown = infoString.substr(0, spacePosition)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo of unkown.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

console.warn's string too.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@benevbright Thanks! I fixed it.

@benevbright benevbright mentioned this pull request Sep 18, 2018
@hagenburger hagenburger mentioned this pull request Sep 19, 2018
@hagenburger hagenburger merged commit 636c6a2 into master Sep 19, 2018
@hagenburger hagenburger deleted the info-string-commands branch September 19, 2018 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants