Skip to content

Commit

Permalink
fix: correct export of he.decode() as decodeEnts()
Browse files Browse the repository at this point in the history
  • Loading branch information
pateketrueke committed Jul 19, 2023
1 parent f653bf9 commit aec2256
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/ssr/doc.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ export function bindHelpers(target) {
return Object.assign(target, { withText, findText });
}

export function decodeEnts(value, opts) {
return he.decode(value, opts);
}

export function encodeText(value, opts = {}) {
value = he.encode(value, { allowUnsafeSymbols: true });

Expand Down
4 changes: 1 addition & 3 deletions src/ssr/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,10 @@ import {
import { markupAdapter } from './adapter.js';

export { markupAdapter } from './adapter.js';
export { bindHelpers, encodeText } from './doc.js';
export { bindHelpers, encodeText, decodeEnts } from './doc.js';

export * from '../index.js';

export * from 'he';

/* global globalThis */
const _global = typeof global === 'undefined' ? globalThis : global;

Expand Down

0 comments on commit aec2256

Please sign in to comment.