GeSHi 单点赞链接

发布于 2024-09-03 16:31:51 字数 218 浏览 2 评论 0原文

是否可以指示GeSHi(http://qbnz.com/highlighter/)生成单个链接线。例如,如果我在“example.com/my-code”URL 上显示突出显示的代码,我希望能够具有如下链接:“example.com/my-mode#line-69”或类似的内容...

Is it possible to instruct GeSHi (http://qbnz.com/highlighter/) to generate link to single line. For example if I show highlighted code on 'example.com/my-code' URL, I would like to be able to have link like: 'example.com/my-mode#line-69' or something like that...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

意中人 2024-09-10 16:31:51

检查文档: http://qbnz.com/ highlighter/geshi-doc.html#adding-ids-to-each-line

所以你必须这样做

$geshi->enable_ids(true);

然后所有的行都会有你可以链接到的id。

Check the docs: http://qbnz.com/highlighter/geshi-doc.html#adding-ids-to-each-line

So you have to do

$geshi->enable_ids(true);

And then all the lines will have ids which you can link to.

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