Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ The general file structure for an extension is as follows:
- `src/` contains the source code for the extension
- `src/main.ts` is the main entry file for the extension (registers commands and wires interlinear XML)
- `src/types/interlinearizer.d.ts` is this extension's types file that defines how other extensions can use this extension through the `papi`. It is copied into the build folder
- `src/parsers/interlinearXmlParser.ts` parses interlinear XML into structured data (uses fast-xml-parser). The PT9 XML schema and parsed output are documented in `src/parsers/pt9-xml.md`
- `src/parsers/pt9/` contains parser and schema for parsing PT9 interlinear XML into structured data
Comment thread
imnasnainaec marked this conversation as resolved.
- `*.web-view.tsx` files will be treated as React WebViews
- `*.web-view.scss` files provide styles for WebViews
- `*.web-view.html` files are a conventional way to provide HTML WebViews (no special functionality)
Expand Down
5 changes: 1 addition & 4 deletions jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,12 @@ const config: Config = {
'^@papi/frontend/react$': '<rootDir>/__mocks__/papi-frontend-react.ts',
/** Mock so test-helpers get UnsubscriberAsyncList without loading ESM deps. */
'^platform-bible-utils$': '<rootDir>/__mocks__/platform-bible-utils.ts',
/** Mock platform-bible-react and lucide-react — both ship ESM that Jest cannot parse. */
/** Mock ESM deps that Jest cannot parse. */
'^platform-bible-react$': '<rootDir>/__mocks__/platform-bible-react.tsx',
'^lucide-react$': '<rootDir>/__mocks__/lucide-react.tsx',
/** Resolve webpack ?inline imports. */
'^(.+)\\.web-view\\?inline$': '<rootDir>/__mocks__/web-view-inline.ts',
/** Resolve webpack ?inline imports: SCSS content. */
'^(.+)\\.(scss|sass|css)\\?inline$': '<rootDir>/__mocks__/styleInlineMock.ts',
/** Resolve webpack ?raw import for test XML in web-view. */
'^(.+)/Interlinear_en_MAT\\.xml\\?raw$': '<rootDir>/__mocks__/interlinearXmlContent.ts',
},

/** Exclude dist from module resolution to avoid Haste naming collision with root package.json. */
Expand Down
2 changes: 1 addition & 1 deletion src/parsers/pt9/pt9-xml.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Paratext 9 XML schema

The extension reads PT9 interlinear data from XML files (e.g. `Interlinear_<lang>_<book>.xml` in project data). The parser in `src/parsers/interlinearXmlParser.ts` expects the following structure. Sample files live in `test-data/` (e.g. `Interlinear_en_MAT.xml`).
The extension reads PT9 interlinear data from XML files (e.g. `Interlinear_<lang>_<book>.xml` in project data). The parser in `src/parsers/pt9/interlinearXmlParser.ts` expects the following structure. Sample files live in `test-data/` (e.g. `Interlinear_en_MAT.xml`).

## Document structure

Expand Down