Line

You are reading docs for v0.8. See latest (v0.9)

packages/engine/jsxSourceAnnotator

Deterministic JSX source annotator (Cockpit live preview, click-to-source).

Engine, v0.8. Source: packages/engine/jsxSourceAnnotator.mjs.

Variables#

CX_SRC_ATTR#

const CX_SRC_ATTR: "data-cx-src" = 'data-cx-src'

Defined in: packages/engine/jsxSourceAnnotator.mjs:16

Functions#

annotateJsxSource()#

annotateJsxSource(source, __namedParameters): object

Defined in: packages/engine/jsxSourceAnnotator.mjs:26

Parameters#

source

any

__namedParameters
file

any

Returns#

object

count = attributes added.

code

code: string

count

count: number


parseCxSrc()#

parseCxSrc(value): object

Defined in: packages/engine/jsxSourceAnnotator.mjs:43

Parse a data-cx-src value. The file may itself contain ':' so split from the right.

Parameters#

value

any

Returns#

object

column

column: number

file

file: string

line

line: number