1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-01-11 09:50:27 +00:00

Extend rendered-plain-text template to support more languages. (#8780)

This commit is contained in:
Leilei332 2024-12-05 20:41:24 +08:00 committed by GitHub
parent dd70e37132
commit a9940506cf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 8 additions and 2 deletions

View File

@ -2,6 +2,7 @@ title: $:/core/ui/ViewTemplate/body/rendered-plain-text
code-body: yes
\whitespace trim
\parameters (language:"css")
<$wikify name="text" text={{!!text}} type={{!!type}}>
<$codeblock code=<<text>> language="css"/>
<$codeblock code=<<text>> language=<<language>>/>
</$wikify>

View File

@ -0,0 +1,4 @@
title: $:/core/ui/ViewTemplate/body/rendered-plain-text/html
code-body: yes
{{||$:/core/ui/ViewTemplate/body/rendered-plain-text|html}}

View File

@ -3,6 +3,7 @@ tags: $:/tags/ViewTemplateBodyFilter
testcase: [tag[$:/tags/wiki-test-spec]type[text/vnd.tiddlywiki-multiple]] [tag[$:/tags/wiki-test-spec-failing]type[text/vnd.tiddlywiki-multiple]] :then[[$:/core/ui/TestCaseTemplate]]
stylesheet: [tag[$:/tags/Stylesheet]then[$:/core/ui/ViewTemplate/body/rendered-plain-text]]
html: [tag[$:/tags/RawMarkupWikified]] [tag[$:/tags/RawMarkupWikified/TopHead]] [tag[$:/tags/RawMarkupWikified/TopBody]] [tag[$:/tags/RawMarkupWikified/BottomBody]] :then[[$:/core/ui/ViewTemplate/body/rendered-plain-text/html]]
core-ui-tags: [tag[$:/tags/PageTemplate]] [tag[$:/tags/EditTemplate]] [tag[$:/tags/ViewTemplate]] [tag[$:/tags/KeyboardShortcut]] [tag[$:/tags/ImportPreview]] [tag[$:/tags/EditPreview]] [tag[$:/tags/EditorToolbar]] [tag[$:/EditorTools]] [tag[$:/tags/Actions]] [tag[$:/tags/ToolbarButtonStyle]] :then[[$:/core/ui/ViewTemplate/body/code]]
system: [prefix[$:/boot/]] [prefix[$:/core/macros]] [prefix[$:/core/save/]] [prefix[$:/core/templates/]] [prefix[$:/config/]] [prefix[$:/core/config/]] [prefix[$:/info/]] [prefix[$:/language/]] [prefix[$:/languages/]] [prefix[$:/snippets/]] [prefix[$:/info/]] [prefix[$:/state/]] [prefix[$:/status/]] [prefix[$:/temp/]] :and[!is[image]] :then[[$:/core/ui/ViewTemplate/body/code]]
code-body: [field:code-body[yes]then[$:/core/ui/ViewTemplate/body/code]]

View File

@ -1,2 +1,2 @@
title: $:/tags/ViewTemplateBodyFilter
list: $:/config/ViewTemplateBodyFilters/testcase $:/config/ViewTemplateBodyFilters/hide-body $:/config/ViewTemplateBodyFilters/code-body $:/config/ViewTemplateBodyFilters/stylesheet $:/config/ViewTemplateBodyFilters/core-ui-advanced-search $:/config/ViewTemplateBodyFilters/core-ui-tags $:/config/ViewTemplateBodyFilters/import $:/config/ViewTemplateBodyFilters/plugin $:/config/ViewTemplateBodyFilters/system $:/config/ViewTemplateBodyFilters/default
list: $:/config/ViewTemplateBodyFilters/testcase $:/config/ViewTemplateBodyFilters/hide-body $:/config/ViewTemplateBodyFilters/code-body $:/config/ViewTemplateBodyFilters/stylesheet $:/config/ViewTemplateBodyFilters/core-ui-advanced-search $:/config/ViewTemplateBodyFilters/core-ui-tags $:/config/ViewTemplateBodyFilters/import $:/config/ViewTemplateBodyFilters/plugin $:/config/ViewTemplateBodyFilters/html $:/config/ViewTemplateBodyFilters/system $:/config/ViewTemplateBodyFilters/default