Markdown,Textile等的JavaScript库;锚引用 [英] JavaScript libraries for Markdown, Textile and others; Anchor references

查看:98
本文介绍了Markdown,Textile等的JavaScript库;锚引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一个javascript库来动态地将结构化的ascii文本转换为html。
我对以下几点特别感兴趣:

I need a javascript library to convert structured ascii text to html on the fly. I am especially interested in the following point:

我想在页面内使用锚定链接,参见 http://www.w3.org/TR/REC-html40/struct/links.html# h-12.1.1

I would like do use anchored links inside pages, see http://www.w3.org/TR/REC-html40/struct/links.html#h-12.1.1

结构化文本的哪个库会支持这个或者如果不支持它可以很容易地扩展(我可以写一个扩展名)?

Which library for structured text would support this or if it is not supported could be easily extended (i could write an extension)?

你能为在页面链接中的结构化ascii文本提出一个简单的语法建议吗?

Can you make a suggestion for a good and simple syntax for structured ascii text for "in page links"?

<a href="#jumpend">jump to the end</a>
...some body text...
<a name="jumpend">this is the end</a>

我喜欢链接在markdown中写的方式,所以名称如何锚定到写的扩展是以一种很好的方式表达的吗?

I like the way links are written in "markdown", so how could the name anchor in a to be written extension be expressed in a nice way?

您认识或推荐哪些图书馆?应该是多浏览器,良好且易于阅读和扩展干净的源代码,积极维护。

Which libraries do you know or can you recommend? Should be multi browser, good and easy to read and extend clean source code, actively maintained.

我目前正在查看JavaScript Markdown库Showdown: http://attacklab.net/showdown/

I am presently having a look at the JavaScript Markdown library "Showdown": http://attacklab.net/showdown/

推荐答案

我认为你不应该使用降价你正在寻找锚引用。尝试以下Creole Wiki标记解析器:

I think that you should not use markdown if you are looking for anchor references. Try the following Creole Wiki markup parsers:

  • A prototype Javascript Creole 0.4 parser can be found at MeatballSociety
  • JavaScript Creole 1.0 Wiki Markup Parser, based on the above

这篇关于Markdown,Textile等的JavaScript库;锚引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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