On 1月29日, 下午2时12分, limodou <[email protected]> wrote: > 2009/1/29 hairui <[email protected]>: > > > > > > > On 1月27日, 下午5时50分, limodou <[email protected]> wrote: > >> 2009/1/27 hairui <[email protected]>: > > >> > 此外,在使用 Ulipad 编辑 reST 格式文档的过程中发现它对部分 reST 语法进行了 highlight 格式化显示 > > >> > 这个功能对于编写或者修改 reST 文档确实帮助很大 > > >> > 想要请教的是这是利用了 docutils 模块还是自己写的? > > >> > 具体是哪部分代码?Limodou 能否指点一下 > > >> 这是自已写的,源码在mixins/LexerRst.py > > > 又看了一些 Sphinx 的文档,发现它对 reST 的渲染工作是 项目 级别的,当然主要原因是它支持多文档之间的交叉引用 > > > 我的直觉是至少可以通过调用的方式来使用它为即时渲染工具,呵呵 > > > 此外,通过它的文档,我发现有个叫 Pygments 的 highlighter ,不知道 Limodou 之前有没有考虑过用它作 高亮显示 > > > 因认识和编程水平有限,建议如有不当之处,权当是向 Limodou 兄叨扰讨教 > > pygments是静态渲染,而且输出的是html, css,而编辑器的高亮是不同的,是动态的,所以还不能直接使用。
不好意思,刚接触到 Sphinx 和 pygments 这类东东,非常新奇也非常兴奋,因此不断胡思乱想 希望这些浅薄的奇思妄想不会扰乱 Limodou 大侠的思路 动态渲染和静态渲染确实有很大区别 如果不停的调用 sphinx 渲染 HTML 虽然有一定可行性,但确实对资源的占用会成为一定的负担 不过把 Ulipad 加上 Sphinx 支持相信却不是件难事,呵呵 > > -- > I like python! > UliPad <<The Python Editor>>:http://code.google.com/p/ulipad/ > UliWeb <<simple web framework>>:http://uliwebproject.appspot.com > My Blog: (new)http://http://hi.baidu.com/limodou > (old)http://www.donews.net/limodou
