Skip to content

Releases: merphx/marklassian

v1.3.1 - Nested emphasis and refactor

14 Apr 05:21
d478afc

Choose a tag to compare

Note

Note to self:
To test out the library locally, add the following to package.json:

{
  // ...
  "dependencies": {
    // ...
    "marklassian": "https://github.com/merphx/marklassian/releases/download/v1.3.1/marklassian-1.3.1.tgz"
  }
}

Note that the library files are in a subdirectory (lib/) so in order for this to work the built dist must also be attached to the GH release assets!

What's new

fix: inline <adf> nodes inside bold/italic/strikethrough

<adf> tags embedded inside emphasis spans (**...**, _..._, ~~...~~) were previously silently dropped. They are now correctly passed through as ADF nodes.

feat: nested emphasis marks

Text wrapped in multiple levels of emphasis (e.g. **bold _and italic_**) now correctly produces ADF text nodes carrying all accumulated marks.

refactor: extract resolveInlineToken helper

Duplicated adf_inline handling across the em, strong, del, and adf_inline switch cases has been extracted into a single resolveInlineToken helper that recurses through nested emphasis, accumulating marks as it goes.

Commits since v1.3.0

  • fix: preserve inline ADF nodes inside em/strong/del
  • refactor: extract resolveInlineToken helper
  • feat: support nested emphasis with accumulated marks

v1.3.0 - Inline ADF tag passthrough support

14 Apr 02:33
4dbd4f3

Choose a tag to compare

Note

Note to self:
To test out the library locally, add the following to package.json:

{
  // ...
  "dependencies": {
    // ...
    "marklassian": "https://github.com/merphx/marklassian/releases/download/v1.3.0/marklassian-1.3.0.tgz"
  }
}

Note that the library files are in a subdirectory (lib/) so in order for this to work the built dist must also be attached to the GH release assets!

What's new

feat: inline <adf> tag passthrough

Pass raw ADF nodes directly in Markdown using inline <adf>{type:...}</adf> syntax. The JSON content is parsed and inserted into the ADF output as a native node, allowing arbitrary ADF structures that Markdown cannot express.

Here is some text with an inline rule: <adf>{"type":"rule"}</adf> and more text.

fix: use local Marked instance

marklassian now uses its own local Marked instance instead of the global singleton, preventing side-effects on consumers who use marked directly elsewhere in their app.

fix: case-insensitive start()

The Marked extension's start() method now matches <adf> tags case-insensitively.

Commits since v1.2.1

  • feat: intercept inline <adf> tags via marked extension
  • fix: use local Marked instance to avoid singleton mutation
  • fix: case-insensitive start(), document marked singleton side-effect
  • docs: update README for inline <adf> support

v1.2.0

04 Mar 02:24
a251e25

Choose a tag to compare

Note

Note to self:
To test out the library locally, add the following to package.json:

{
  // ...
  "dependencies": {
    // ...
    "marklassian": "https://github.com/merphx/marklassian/releases/download/v1.2.0/marklassian-1.2.0.tgz"
  }
}

Note that the library files are in a subdirectory (lib/) so in order for this to work the built dist must also be attached to the GH release assets!

Release v1.2.0 with ADF passthrough support via <adf> tags.