File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -217,11 +217,7 @@ extraApiPluginInfoFinder.isJavaScriptAvailable()
217217** 使用示例**
218218
219219``` html
220- <!-- /* 根据插件版本条件性显示功能 */-->
221- <th:block th:if =" ${extraApiPluginInfoFinder.isFullVersion()}" >
222- <div th:utext =" ${extraApiRenderFinder.renderCodeHtml(post.content?.content)}" ></div >
223- </th:block >
224-
220+ <!-- /* 根据插件版本条件性显示 */-->
225221<th:block th:unless =" ${extraApiPluginInfoFinder.isFullVersion()}" >
226222 <p >当前使用轻量版插件,代码高亮功能不可用</p >
227223</th:block >
@@ -234,10 +230,10 @@ extraApiPluginInfoFinder.isJavaScriptAvailable()
234230 <p >JavaScript 功能可用,支持高级渲染功能</p >
235231</div >
236232
237- <!-- /* 结合其他条件使用 */-->
233+ <!-- /* 结合其他条件使用,下面这段代码可直接用于 /templates/post.html */-->
238234<th:block th:if =" ${pluginFinder.available('extra-api') and extraApiPluginInfoFinder.isFullVersion()}" >
239235 <!-- 只有在插件可用且为全量版时才显示 -->
240- <div th:utext =" ${extraApiRenderFinder.renderCodeHtml( content)}" ></div >
236+ <div th:utext =" ${extraApiRenderFinder.highlightCodeInHtml(post.content?. content)}" ></div >
241237</th:block >
242238```
243239
You can’t perform that action at this time.
0 commit comments