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

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

Merged
merged 1 commit into from Oct 29, 2018

Conversation

Projects
None yet
2 participants
@rdegelo
Contributor

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;

This comment has been minimized.

@roblourens

roblourens Oct 29, 2018

Member

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

This comment has been minimized.

@rdegelo

rdegelo Oct 29, 2018

Contributor

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.

This comment has been minimized.

@roblourens

roblourens Oct 29, 2018

Member

Oh, didn't know that, thanks.

@roblourens

Thanks for the PR!

@roblourens roblourens merged commit 9bd3204 into Microsoft:master Oct 29, 2018

1 check passed

license/cla All CLA requirements met.
Details

@roblourens roblourens added this to the October 2018 milestone Oct 29, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment