0.1.3 • Published 3 years ago

@labdigital/mdpostprocess v0.1.3

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

Markdown post processor

Usage::

const processor = new MarkdownPostProcessor("my")
processor.registerURL("product", /product\/(?<key>[A-Za-z0-9\-\_]+)/

const rawText = "see my://product/key for more information"

const processedText = await processor.process(rawText, (tags) => {
  tags.get('product')?.forEach((p) => {
    p.replaceValue = "/product/some-product-slug"
  })
  return tags
})

// Outputs see /product/some-product-slug for more information
console.log(processedText)
0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago