通过Redmine插件扩展RedCloth?

发布于 2024-10-09 07:29:24 字数 293 浏览 0 评论 0原文

我是 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

£噩梦荏苒 2024-10-16 07:29:24

您可能会考虑切换到两个 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文