Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table extension depends on parser internals #50

Open
not-my-profile opened this issue Oct 4, 2024 · 0 comments
Open

Table extension depends on parser internals #50

not-my-profile opened this issue Oct 4, 2024 · 0 comments

Comments

@not-my-profile
Copy link
Contributor

I think it would be nice if all the extensions provided (in extension.ts) could also be provided by a third party package.

However that's not the case, if you apply this patch:

diff --git a/src/extension.ts b/src/extension.ts
--- a/src/extension.ts
+++ b/src/extension.ts
@@ -1,5 +1,6 @@
-import {InlineContext, BlockContext, MarkdownConfig,
-        LeafBlockParser, LeafBlock, Line, Element, space, Punctuation} from "./markdown"
+import type {InlineContext, BlockContext, MarkdownConfig,
+             LeafBlockParser, LeafBlock, Line, Element} from "../dist/index"
+import {space, Punctuation} from "./markdown"
 import {tags as t} from "@lezer/highlight"
 
 const StrikethroughDelim = {resolve: "Strikethrough", mark: "StrikethroughMark"}

and run npx tsc --noEmit you get:

src/extension.ts:129:21 - error TS2339: Property 'scanLine' does not exist on type 'BlockContext'.

129       let next = cx.scanLine(cx.absoluteLineEnd + 1).text
                        ~~~~~~~~

src/extension.ts:129:33 - error TS2339: Property 'absoluteLineEnd' does not exist on type 'BlockContext'.

129       let next = cx.scanLine(cx.absoluteLineEnd + 1).text
                                    ~~~~~~~~~~~~~~~


Found 2 errors in the same file, starting at: src/extension.ts:129
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant