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

Probably code block bug with trailing ``` #36

Open
hkalexling opened this issue Aug 23, 2016 · 0 comments
Open

Probably code block bug with trailing ``` #36

hkalexling opened this issue Aug 23, 2016 · 0 comments

Comments

@hkalexling
Copy link

hkalexling commented Aug 23, 2016

what I did

NSString *md = @"```c\n//This is a code block\n```";
NSData *data = [md dataUsingEncoding:NSUTF8StringEncoding];
CMDocument *document = [[CMDocument alloc] initWithData:data options:0];
CMAttributedStringRenderer *renderer = [[CMAttributedStringRenderer alloc] initWithDocument:document attributes:[CMTextAttributes new]];
NSAttributedString *attributedString = [renderer render];
NSLog(@"%@", attributedString);

What I expect

//This is a code block{
    NSFont = ...
}

What I got

//This is a code block
```{
    NSFont = ...
}

Note that the trailing ``` is included in the returned NSAttributedString

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

1 participant