:footnotes扩展名在Redcarpet Ruby gem中不起作用 [英] :footnotes extension won't work in Redcarpet Ruby gem

查看:84
本文介绍了:footnotes扩展名在Redcarpet Ruby gem中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我肯定想念一些非常明显的东西-我无法获得脚注来处理redcarpet.我的版本是3.0.0:

I must be missing something very obvious -- I can't get footnotes to work with redcarpet. I have version 3.0.0:

> gem list redcarpet
*** LOCAL GEMS ***

redcarpet (3.0.0)

我正在尝试从Github存储库上的测试代码中获得的代码不会将Markdown转换为包含脚注的HTML.我将代码简化为脚注功能,然后将其放在Gist上.

I am trying code from the test code on the Github repo that has footnotes and it won't convert the Markdown to HTML that contains the footnote. I reduced the code down to just the footnotes function and put it on Gist.

输出简单如下:

<p>This is a footnote.[^1]</p>
<p>[^1]: It provides additional information.</p>

我在这里想念什么?

推荐答案

我也遇到了这个问题.看起来Rubygem需要更新到3.0.0版本,以便脚注生效. master分支中有一些更改,这些更改在Rubygems上不可用.

I have had this problem as well. It looks like the Rubygem needs to be updated past version 3.0.0 in order for footnotes to work. There are changes in the master branch which aren't available on Rubygems.

要暂时解决您的问题,请从Redcarpet Github存储库中获取宝石:

To fix your issue for the time being, source the gem from the Redcarpet Github repo:

gem 'redcarpet', github: 'vmg/redcarpet', branch: 'master'

gem 'redcarpet', github: 'vmg/redcarpet', branch: 'master'

然后运行bundle install.脚注现在应该可以工作了.

Then run bundle install. Footnotes should now work.

我已经在Redcarpet存储库上打开了一个问题,试图使某人使用最新更改更新Rubygem.完成后,我会在这里发帖.

I've opened an issue on the Redcarpet repo to try to get someone to update the Rubygem with the latest changes. I'll post back here if/when that's done.

这篇关于:footnotes扩展名在Redcarpet Ruby gem中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆