markdown-js icon indicating copy to clipboard operation
markdown-js copied to clipboard

eat 100% CPU for specific text.

Open hustxxb opened this issue 11 years ago • 1 comments

parse following text file(a.md) eat 100% cpu:

```

- (void)handleOrientation:(NSNotification *)notification
{

    switch (currentOrientation) {
        case UIInterfaceOrientationPortrait:
            rotation = 0;
            break;
        case UIInterfaceOrientationPortraitUpsideDown:
            rotation = M_PI;
            break;
        case UIInterfaceOrientationLandscapeLeft:
            rotation = -M_PI_2;
            break;
        case UIInterfaceOrientationLandscapeRight:
            rotation = M_PI_2;
            break;
    }
}
```

Code:

var s = require("fs").readFileSync('./a.md');
require("markdown").markdown.toHTML(s.toString());

hustxxb avatar Jun 10 '14 07:06 hustxxb

:+1: Confirmed.

Also i cannot do multi-line block of code?

vekexasia avatar Oct 03 '14 21:10 vekexasia