Comments (8)
Templater does support replacing Templater tags inside of codeblocks, so it does make sense why it does it's syntax highlighting. I definitely don't think we should remove support for Templater tags in codeblocks, but I do think there's an argument for disabling just the syntax highlighting in codeblocks.
from templater.
I think I came across the same bug. I'm not a 100% sure it's actually a bug though. Using the following note content:
```bash
echo '<%'
```
I am outside the codeblock
Disabling Templater's setting "Syntax Highlighting on Desktop" (I'm working on desktop) produces this:
from templater.
'm trying to document some code and the code blocks are behaving a little differently in a callout vs just being in the note independently. I looked on the forums but couldn't find anything to solve the issue but what I did find was people discussing that the java <> brackets may be causing a rendering issue possible that it thinks there are HTML instead of just code.
Below is a screen shot of what I am seeing, on the left is the source of the MD file the Right is rendered in Read View. Unfortunately the render is not always consistent, sometime its completely off without any change but there is no discernable pattern to it.
I have tried to use other characters in place of the <> like escaping it or even using < but the render just looks the same it does in edit mode, it doesn't resolve to anything
I tried a clean vault with no plugins and it worked like I would expect it to. Im ok with putting escape character within my code block but when I add them and go to the reading pane it shows the escape character as well as the charter is supposed to escape in the first place.
Again if there was a way to escape the character in the editing page but rendered correctly I would be fine and I think that would solve the problem for most.
from templater.
I also think that's a bug, the mere presence of <%
just destroys the code block rendering. I had to disable every plugin until I found that templater was causing this issue with my code blocks.
from templater.
Interesting is there a way to escape that? or even use some sort of char code ASCII 60 and 37 to display instead of the actual <% or even a unicode character number
ASCII
>% = <%
%< = %>
UTF-8
<% = <%
%> = %>
from templater.
Im sorry just having a little trouble following this last part of the thread, is this issue being tabled? Is there some sort of work around to have it display? Or is it marked as some future feature request?
from templater.
This is a very difficult problem to solve, the syntax highlighting code is very complex and was written by someone who no longer contributes to the Templater project. I don't know when this will be fixed.
For now, I suggest disabling syntax highlighting for Templater if you are affected by this issue. Or only enabling it when you're working on A template and disabling it when you're done.
from templater.
Ok thanks, I was just curious is all.
from templater.
Related Issues (20)
- main.js missing HOT 3
- Date not rendered as link HOT 1
- 2.3.2 broke my frontmatter processing template HOT 6
- Auto jump to cursor is triggered twice on new file creation HOT 4
- invalid reference date format, try specifying one with reference format HOT 4
- bug: app.workspace.getLeaf().openFile() replaces content in a note if called without "await"
- app.fileManager.processFrontMatter doesn't work HOT 1
- Templater should parse, merge and write out frontmatter gracefully HOT 6
- Applying Text Color in Obsidian Without Unwanted New Lines HOT 2
- Templater no longer works with console error "Plugin failure: templater-obsidian TypeError: c is not a constructor" HOT 2
- The recent upgrade of this plug-in has broken "Trigger Templater on new file creation" HOT 6
- {{date}} fail to work after updating to 2.3.3 HOT 1
- Target file gets overwritten by processFrontMatter() HOT 1
- Note Creation with Core Plugin "Note Composer" Breaks Templater HOT 1
- Option to add ignored files to Templater settings HOT 2
- Copy existing file with templater HOT 1
- Ability to use {{date}} in Folder Templates HOT 2
- Templater file module does not support the concurrent creation of files HOT 4
- Folder Template overwrites non-empty note HOT 2
- Daily Quote errors HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from templater.