prismicio / prismic-dom

Set of helpers to manage Prismic data
https://prismic.io/docs/technologies/prismic-dom-technical-reference
44 stars 16 forks source link

Add markdown support #33

Closed grumpyoldman-io closed 5 years ago

grumpyoldman-io commented 5 years ago

Heya,

I've created a asMarkdown function based on the asHTML. You also see a lot of code formatting here, I think this is because of the lack of linters (I only used prettier here).

The tests are updated, and so is the readme.

let me know what you think.

aside:

arnaudlewis commented 5 years ago

Hi @grumpyoldman-io, I really appreciate your PR and it seems pretty good. One thing, I'd rather do it in another library, something like prismic-markdown which handles markdown and only that. I think it makes more sense to split in different libraries according to the format we want. For instance we have Prismic-dom for html, prismic-reactjs for react component and so on. What do you think?

grumpyoldman-io commented 5 years ago

Hey @arnaudlewis, yeah, that would be a lot better I guess. How do you want to handle this? I can image that you prefer that Prismic would be the owner of that package. You are welcome to copy/paste my code if you like (it's basicly what I did). I can also push my code to the new package if you like.

arnaudlewis commented 5 years ago

All right then we'll do it that way. Thank you for your contribution :)

Le mar. 26 févr. 2019 à 11:33, Marvin de Bruin notifications@github.com a écrit :

Yeah, that would be a lot better I guess. How do you want to handle this? I can image that you prefer that Prismic would be the owner of that package. You are welcome to copy/paste my code if you like (it's basicly what I did).

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/prismicio/prismic-dom/pull/33#issuecomment-467386426, or mute the thread https://github.com/notifications/unsubscribe-auth/AFtiX3piBtuI6xjt9nh3FrA3_3lTIbZyks5vRQ1pgaJpZM4bRywn .

grumpyoldman-io commented 5 years ago

@arnaudlewis Can you post an update when it is available here? Or if you need help.

arnaudlewis commented 5 years ago

No problem

Le mar. 26 févr. 2019 à 14:07, Marvin de Bruin notifications@github.com a écrit :

Can you post an update when it is available here? Or if you need help.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/prismicio/prismic-dom/pull/33#issuecomment-467430608, or mute the thread https://github.com/notifications/unsubscribe-auth/AFtiXzxpsMvPX7Ls9mIpUB-5IITIOaT8ks5vRTGNgaJpZM4bRywn .

grumpyoldman-io commented 5 years ago

@arnaudlewis I've created a repo since I need it on a project I'm working on. I've invited you as a collaborator. It is not yet available as a NPM module, I've just set up the codebase based on prismic-dom/reactjs

grumpyoldman-io commented 5 years ago

@arnaudlewis I've published the package https://www.npmjs.com/package/prismic-markdown. Feel free to email me to transfer ownership or for collaboration.