Giter Club home page Giter Club logo

remark-sectionize's Issues

Help needed: Wrap siblings to one parent wrapper

Hi, first of all, thanks for this amazing plugin.

This is not an issue, per se. As this plugin wraps elements into a wrapper section, I thought this is a right place to ask a question on creating similar plugin.

Examples

1

I want to wrap this:

> this is a blockquote
<figcaption></figcaption>

into this:

<figure>
> this is a blockquote
<figcaption></figcaption>
</figure>

2

term

: definition
: definition

into this:

<div>

term

: definition
: definition

</div>

3

term

: definition
: definition


term2

: definition2
: definition2a

into this:

<div>

term

: definition
: definition

</div>

<div>

term2

: definition2
: definition2a

</div>

Currently, https://github.com/Symbitic/remark-plugins/blob/master/packages/remark-deflist/src/index.js this plugin converts term and definition into proper HTML.

<dl>

<dt></dt>
<dd></dd>
<dd></dd>

</dl>

and

<dl>

<dt></dt>
<dd></dd>
<dd></dd>

<dt></dt>
<dd></dd>
<dd></dd>
</dl>

So, basically I want to have a wrapper set for some sibling elements. Can you kindly make one plugin for this or guide as to how to proceed?

remark@next (13)

Hi!

remark is switching to a new parser internally (micromark, see remarkjs/remark#536 for more info).
From a quick glance at the code, it seems this plugin should be fine. However, it would be good to check that in the future (there is 13.0.0-alpha.0 published now, and one or two more will come before the release)

Incompatible with react-markdown 5.0.3

I'm getting following error:

scheduler.development.js?3069:171 Uncaught Error: Renderer for type `section` not defined or is not renderable
    at astToReact (ast-to-react.js?515f:34)
    at eval (ast-to-react.js?515f:42)
    at Array.map (<anonymous>)
    at resolveChildren (ast-to-react.js?515f:41)
    at astToReact (ast-to-react.js?515f:38)
    at eval (react-markdown.js?22e8:48)
    at Array.forEach (<anonymous>)
    at ReactMarkdown (react-markdown.js?22e8:47)
    at renderWithHooks (react-dom.development.js?61bb:14985)
    at mountIndeterminateComponent (react-dom.development.js?61bb:17811)

when using this with react-markdown 5.0.3. react-markdown should be compatible with remark plugins as that's what it uses under the hood.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.