jinghu-moon / typora-see-yue-theme

See Yue 系列主题是一个自定义样式极多、简约、充满细节的 Typora 主题。(The See Yue series theme is a Typora theme with a plethora of custom styles, minimalism, and full of details.)

Home Page:https://theme.typora.io/theme/see-yue/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

关于图片x-y, typora编译的时候好像变量名是会变的

one-pyy opened this issue · comments

s="<span md-inline='"+g+"'"+S+" contenteditable='false' class='md-image"+L+"' data-src='"+k+"' "+b+">
s="<span md-inline='"+g+"'"+S+" contenteditable='false' class='md-image md-img-loaded"+w+"' "+b+">
/* 将末尾 "> 替换为第四行代码 */
" alt='"+ (F.getAttribute("alt") ? ". "+(/^(shadow-|blur-|gray-)?(.*)$/.exec(F.getAttribute("alt"))[2]) : "") +"'>

譬如我这里好像是这样的:
f=p||-1<loadedImgCache.indexOf(m)||-1<loadedImgCache.indexOf(C(m,!0))?(i.setAttribute("src",t),i.setAttribute("onerror","onImageErrorFunc(event)"),i.setAttribute("onload","onLoadedFuncForQuickAction(event)"),"<span md-inline='"+s+"'"+n+" contenteditable='false' class='md-image md-img-loaded"+d+"' "+c+" alt='"+ (F.getAttribute("alt") ? ". "+(/^(shadow-|blur-|gray-)?(.*)$/.exec(F.getAttribute("alt"))[2]) : "") +"'>

然后就分不清F该改成什么了

能否提供更多上下文?

图片图释失效了吗?如果是,请提供 typora 版本。我去测试下。

typora是1.8.10

刚试了一下, 我这里把F改成i就可以

image

但是序号好像没显示出来, 是因为启用了那个被弃用的自动编号嘛

图片序号不是显示出来了吗?难道你说的图片序号是 1-1、2-2 这种吗?你需要在 see-yue-xxxx.css 中,启用如下 CSS。

/* 15.1 图片编号设置 */
@import "./SeeYue/CSS/images/images-number.css";

./SeeYue/CSS/images/images.css 中注释以下代码。

#write {
  counter-reset: imgNum;
}

#write p>.md-image:not(.md-img-error)::after {
  content: "图 "counter(imgNum)"  "attr(alt) !important;
}

好嘞, 谢谢大佬, 麻烦大佬了

其实指的是可能需要写清楚需要根据前文setAttribute的对象更改对应的变量, 譬如我这里前面是i, 后面的F就要改成i