Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while rendering annotation The language "markdown" has no grammar. #384

Open
TrillStones opened this issue Sep 22, 2024 · 0 comments

Comments

@TrillStones
Copy link

image

'ZtTemplates/zt-annot.eta.md' file content:


<%
var colorToLabelMap = {
// style 插件默认颜色分类
    "#ffd400": "我的高亮",
	"#5fb236": "章节标题",
	"#2ea8e5": "书籍重点",
	"#ff6666": "疑惑内容",
	"#f19837": "阅读进度",
	"#aaaaaa": "英语单词",
	"#a28ae5": "紫色类型",
	"#e56eee": "品红色类型",
// 如果是历史zotero的颜色配置,按需要添加

    // 示例颜色
    // 默认值,如果颜色不匹配任何上述项
    "default": "未分类笔记" 
};
var labelToShow = colorToLabelMap[it.color] || colorToLabelMap["default"];
%>


[!note] <span style="background:<%= it.color %>"><%= labelToShow %></span>   



 <span style="background:<%= it.color %>"><%= it.imgEmbed %><%= it.text %></span>
<% if (it.comment) { %>
---
 <%= it.comment %>
<% } %>
---
[🔗](<%= it.backlink %>)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant