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

Code and Syntax Highlighting not working for Curly Braces? #27

Closed
Programazing opened this issue Oct 15, 2017 · 2 comments
Closed

Code and Syntax Highlighting not working for Curly Braces? #27

Programazing opened this issue Oct 15, 2017 · 2 comments

Comments

@Programazing
Copy link

Is it just me or does the code highlighting not work if curly braces are present in the code?

@jfcere
Copy link
Owner

jfcere commented Oct 15, 2017

If you want to use curly braces between the markdown-to-html tags you need to escape the opening curly brace.

replacing { by {
<markdown-to-html>
  export class Example &#123;
    foo: string;
    bar: string;
  }
</markdown-to-html>

But if you put the code in a separate file and use src property on markdown-to-html component you don't need to escape the content of the file.

load file with src input property
<markdown-to-html [src]="'path/to/example.ts'"></markdown-to-html>
example.ts
export class Example {
  foo: string;
  bar: string;
}

@Programazing
Copy link
Author

Thanks, that works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants