MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / regionLanguage

Function regionLanguage

__tests__/vue-tsx-script.test.ts:137–137  ·  view source on GitHub ↗
(source: string, host: 'vue' | 'svelte')

Source from the content-addressed store, hash-verified

135
136 it('is highlighted in the viewer with the grammar it was indexed with', () => {
137 const regionLanguage = (source: string, host: 'vue' | 'svelte') => syntaxRegionsFor(source, host)?.map((r) => r.language);
138 expect(regionLanguage(PROJECT['src/Card.vue']!, 'vue')).toEqual(['tsx']);
139 expect(regionLanguage(PROJECT['src/Plain.vue']!, 'vue')).toEqual(['typescript']);
140 expect(regionLanguage(PROJECT['src/Legacy.vue']!, 'vue')).toEqual(['javascript']);

Callers 1

Calls 2

syntaxRegionsForFunction · 0.90
mapMethod · 0.80

Tested by

no test coverage detected