通过Redmine插件扩展RedCloth?
我是 Ruby/Redmine/Redcloth 的新手,但我正在努力实现以下目标: 在 Textile 中构建链接的默认方式是“foo”:http://bar。然而,一天中 90% 的时间我都使用 Atlassian 产品,这些产品使用 [foo|http://bar] 作为链接标记。
为了保持一切统一,我想通过插件在 Redmine 中实现这一点。但是,您似乎无法更改宏语法,因此我必须考虑扩展 RedCloth 以接受这种形式的插入链接。
有谁知道我怎样才能实现这一目标?
谢谢你,圣诞快乐,
丹尼斯
I'm new to Ruby/Redmine/Redcloth but I'm trying to achieve the following:
The default way to build a link in Textile is "foo":http://bar. However, 90% of the day I use Atlassian products, which use [foo|http://bar] as link markup.
To keep everything a bit uniform I'd like to implement this in Redmine via a plugin. However, it appears that you can't change the macro syntax so instead I'll have to look into extending RedCloth to accept this form of inserting links.
Does anyone know how I can achieve this?
Thank you and merry christmas,
Dennis
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能会考虑切换到两个 Markdown 插件之一(一个是 Markdown Extra-like,基于 Bluefeather),它们在链接样式上更相似,尽管与您习惯的不同。不过,既然您使用了 SO,那么您显然对它很熟悉。
否则,您必须编写一个完整的插件,我提到的任何一个插件都可以作为一个很好的模型。祝你好运。
You might consider switching to one of the two Markdown plugins (one is Markdown Extra-like, based on Bluefeather), which are a bit more similar in link style, although not the same as what you are used to. Since you use SO, though, you're obviously familiar with it.
Otherwise you'd have to write a full plugin, for which either of the plugins I've mentioned would serve as a good model. Best of luck.