Closed benjamineskola closed 1 month ago
Congratulations on filing issue #1 :)
I haven't used remark-cli
before, but I was able to reproduce the problem on my machine.
It looks like remark-cli
is a thin wrapper around unified-args
which just passes config to unified-engine
. I spent some time trying to determine how exactly the plugins
config for remark-cli
actually influences the markdown processor, but the code is a bit hard to follow.
It's not clear to me what "plugin" means in the context of remark-cli
. I found this page, which seems to suggest that some extra code needs to be written to support unified-engine
. It's not clear to me if plugins can alter the markdown syntax. Have you had success with other syntax extensions?
I started a discussion in the remark
repo so hopefully we can get some guidance from the maintainer. PR's are welcome to this repo by the way ;)
I've used a few other extensions successfully. remark-frontmatter is a good example. When it's disabled, yaml front matter is treated as just some markdown and reformatted; when it's enabled, it's preserved as yaml. Similarly, remark-wiki-link — when disabled, a sequence [[foo]]
gets escaped as \[\[foo]]
, and when enabled it's preserved.
However I don't really see what those do differently to your plugin.
edit: actually, one difference seems to be that they both export a default function: here and here but I can't tell if that's significant. remark-gfm and remark-footnotes do likewise.
I'm closing this since I believe it should be fixed by recent changes (including a default export). Please feel free to reopen if the issue is still affecting you!
I'm trying to use Remark (via
remark-cli
) to ensure uniform formatting in my Markdown documents; as I use Pandoc I'd like to useremark-cite
to preserve the citations (as otherwise, the opening square bracket is escaped with a backslash). However, including the plugin doesn't appear to affect the output that is generated.Using the example from the documentation:
test.md
:Minimal config in
~/.remarkrc.yml
(other plugins/settings removed to confirm they're not interfering):I feel like this might be a misconfiguration on my part, as I found the documentation for config files and how plugin settings map onto them to be a little unclear, and I had issues with that with other settings. But in this case
enablePandocSyntax
should be true by default, and it doesn't even seem to be parsing in the first place — but I presume the module is being loaded, because specifying a nonexistent plugin name causes an error. Any suggestions for how to debug this would be appreciated.