Skip to content
This repository was archived by the owner on Oct 2, 2021. It is now read-only.

Improving Debug Console Styling. Adding underline and background support#374

Merged
roblourens merged 1 commit intomicrosoft:masterfrom
rdegelo:master
Oct 29, 2018
Merged

Improving Debug Console Styling. Adding underline and background support#374
roblourens merged 1 commit intomicrosoft:masterfrom
rdegelo:master

Conversation

@rdegelo
Copy link
Contributor

@rdegelo rdegelo commented Oct 23, 2018

No description provided.

// value:"color: gray; font-weight: light
const colorMatches = colorRegex.exec(arg.value);
const fontWeightMatches = fontWeightRegex.exec(arg.value);
const cssRegex = /\s*(.*?)\s*:\s*(.*?)\s*(?:;|$)/g;
Copy link
Member

Choose a reason for hiding this comment

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

Isn't the .*? redundant or is that different than .*?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Its not, * is greedy by default, and will try to match as much text as possible and will eventually match multiple parameters. ? makes it lazy.

test: aaaa; test2: bbbbb;

If ? gets removed, the first match on this text will be the whole string, and that's not what we want.

Copy link
Member

Choose a reason for hiding this comment

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

Oh, didn't know that, thanks.

Copy link
Member

@roblourens roblourens left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!

@roblourens roblourens merged commit 9bd3204 into microsoft:master Oct 29, 2018
@roblourens roblourens added this to the October 2018 milestone Oct 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants