diplodoc-platform / diplodoc-platform/transform

TypeError: hljs.getLanguage is not a function with highlight.js v11 under bundler moduleResolution

Open
#756 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
69
Forks
59
Avg merge
1d 21h
Merged PRs (30d)
6

Description

### Package version

v4.57.7

### Node version

v18.19.1

### Platform

_No response_

### What steps will reproduce the bug?

```typescript
const getHtmlContent = (value: string) => {
try {
const { result } = transform(value, {
allowHTML: true,
disableCommonAnchors: true,
});

return result.html;
} catch (error) {
// TypeError: hljs.getLanguage is not a function
}
};
```

### What is the expected behavior?

Transform returns valid html

### What do you see instead?

I see error, markdown breaks

### Additional information

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.