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

feature(highlight): enhancements and code-health. #277

Merged
merged 26 commits into from
Jan 24, 2017

Conversation

emoralesb05
Copy link
Contributor

@emoralesb05 emoralesb05 commented Jan 22, 2017

Description

Major enhancements, initial unit tests and XSS protection.

What's included?

  • feature(highlight): Added [content] input to load code content dynamically.
  • feature(highlight): Support for any pre-built highlight.js theme.
  • feature(highlight): Mimicking VS Dark+ theme as closely as possible when importing covalent-highlight-theme.
  • bugfix(highlight): Use Renderer to limit access to native DOM and DomSanitizer to prevent XSS issues.
  • bugfix(highlight): Remove only empty lines at the beginning and end of code content only to keep new lines within code.
  • bugfix(highlight): Remove html workaround so code parsing is more generic now and html is properly displayed.
  • code-health(highlight): Added initial set of unit-tests.
  • Updated README.md and demo.
  • Load README.md as resource in docs to avoid doc duplication.

Test Steps

Screenshots or link to CodePen/Plunker/JSfiddle

image

image

Copy link
Contributor

@mrjasonweaver mrjasonweaver left a comment

Choose a reason for hiding this comment

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

Seeing warnings when running npm run tests but looks normal as they are referencing HTML sanitation.
screen shot 2017-01-23 at 10 04 01 am

@jeremysmartt jeremysmartt self-assigned this Jan 23, 2017
});
})));

it('should render cpde from dynamic content', async(inject([], () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

typo: cpde

@@ -20,7 +20,7 @@ By default, `--dev` build will log the following message in the console to let y

This component can be installed as npm package.

```npm
```bash
Copy link
Collaborator

Choose a reason for hiding this comment

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

this works on windows also? should this say bash?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

bash is the language used to apply color theme in GitHub

@jeremysmartt
Copy link
Collaborator

LGTM!

@emoralesb05 emoralesb05 merged commit 3311d4a into develop Jan 24, 2017
@emoralesb05 emoralesb05 deleted the feature/highlight-enhancements branch January 24, 2017 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants