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

Block elements (target, comment, block-break) #16

Closed
3 tasks
rowanc1 opened this issue Aug 4, 2021 · 2 comments
Closed
3 tasks

Block elements (target, comment, block-break) #16

rowanc1 opened this issue Aug 4, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@rowanc1
Copy link
Member

rowanc1 commented Aug 4, 2021

Describe the enhancement you'd like

There are three block elements to implement here:

  • comment
  • block-break
  • header targets

Does this solve a specific problem?

No response

What alternatives exist?

There is some prior art here:

Additional context

Target

Then we also have the target syntax in myst: (label)= (a reference implementation is currently here: https://github.com/executablebooks/myst-vs-code/blob/83460fc5f14517e8d6c6b7eb5581d814389fbc7c/src/mdPlugins.ts#L32, but perhaps we should move that into this package, they also get a little trick as we also need to "propagate" them down to the next block token, see: https://github.com/chrisjsewell/rst-language-server#transformsreferencespropagatetargets).

Essentially we want to be able to easily "scan" down the markdown-it token stream, and pull out all these targets and references, along with their map (a.k.a. position in the source text) and probably index in the token stream

Originally from #10

@rowanc1 rowanc1 added the enhancement New feature or request label Aug 4, 2021
@executablebooks executablebooks deleted a comment from welcome bot Aug 4, 2021
@rowanc1
Copy link
Member Author

rowanc1 commented Feb 3, 2022

@chrisjsewell looking at the library that you have opened up here (myst-extras) are you thinking these shouldn't be in this repo? It looks like you have moved the targets/blocks/comments over there.

@rowanc1
Copy link
Member Author

rowanc1 commented Feb 18, 2022

These have been moved to the https://github.com/executablebooks/markdown-it-myst-extras repository.

@rowanc1 rowanc1 closed this as completed Feb 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant