解析URL并在纯文本玉上创建链接

时间:2016-08-09 11:49:23

标签: javascript node.js pug template-engine

我正在获得可以有URL的纯文本。

例如 :在一天之内学习abc www.englishspeaking.com

我在这里有一个URL。我想转换它有一个链接。我正在使用Jade模板引擎。有没有办法在Jade模板引擎中执行此操作。

2 个答案:

答案 0 :(得分:0)

像这样使用markdown过滤器

:markdown
  this is the start of the para.
  [a link](http://example.com)
  and this is the rest of the paragraph.

答案 1 :(得分:0)

您可以使用已构建的npm。像这样,我找到anchrome,它也为我工作

相关问题