Skip to content

Commit 134ca32

Browse files
committed
Rename util for linkifying modules to clarify it works with export too
1 parent 365bd9f commit 134ca32

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

server/utils/code-highlight.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ interface LinkifyOptions {
167167
* @param html - The HTML to process
168168
* @param options - Dependencies map and optional relative import resolver
169169
*/
170-
function linkifyImports(html: string, options?: LinkifyOptions): string {
170+
function linkifyModuleSpecifiers(html: string, options?: LinkifyOptions): string {
171171
const { dependencies, resolveRelative } = options ?? {}
172172

173173
const getHref = (moduleSpecifier: string): string | null => {
@@ -285,7 +285,7 @@ export async function highlightCode(
285285

286286
// Make import statements clickable for JS/TS languages
287287
if (IMPORT_LANGUAGES.has(language)) {
288-
html = linkifyImports(html, {
288+
html = linkifyModuleSpecifiers(html, {
289289
dependencies: options?.dependencies,
290290
resolveRelative: options?.resolveRelative,
291291
})

0 commit comments

Comments
 (0)