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

ui: pretty-print - html files doesn't highlight classes #601

Closed
catlabs opened this issue Aug 2, 2018 · 0 comments · Fixed by #647
Closed

ui: pretty-print - html files doesn't highlight classes #601

catlabs opened this issue Aug 2, 2018 · 0 comments · Fixed by #647

Comments

@catlabs
Copy link
Contributor

catlabs commented Aug 2, 2018

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/NationalBankBelgium/stark/blob/master/CONTRIBUTING.md#got-a-question-or-problem

Current behavior

When we parse html data, the class attributes are not highlighted in the pretty-print.component.ts in the showcase.

Expected behavior

html attributes should have a different color

Minimal reproduction of the problem with instructions

TS:

this.headerHtml = [
  '<!DOCTYPE html><html><head><style>body class="test"',
  '</style></head><body><h1>This is a heading</h1><p>This is a paragraph.</p></body></html>'
].join("")

HTML:

<stark-pretty-print [data]="headerHtml" format="html" [enableHighlighting]="true"></stark-pretty-print>

Wd should in fact use backticks instead of a string join, so we can create easily a multiline string

TS:

this.headerHtml = 
  `<!DOCTYPE html><html><head><style>body class="test"
  </style></head><body><h1>This is a heading</h1><p>This is a paragraph.</p></body></html>`;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants