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

[BUG: Internal] Code blocks don't render in Reader View #46

Open
ggstrader opened this issue Feb 27, 2023 · 3 comments
Open

[BUG: Internal] Code blocks don't render in Reader View #46

ggstrader opened this issue Feb 27, 2023 · 3 comments
Assignees
Labels
bug Something isn't working internal Internal Issue

Comments

@ggstrader
Copy link

Describe the bug

When placing codeblocks in columns, they render just fine in Live Preview. But they disappear in reader view. This happens with every codeblock that isn't plain-text like code.

Steps To Reproduce

Add a codeblock for any other plugin as a column:


`````col
````col-md
flexGrow=1
===
```dataview
LIST FROM "Guides"
```
````

````col-md
flexGrow=1
===
>[!quote] 
>We are what our thoughts have made us; so take care about what you think. Words are secondary. Thoughts live; they travel far.  
>
> — Swami Vivekananda
````
`````

Expected behavior

Renders in both Live Preview and Reader view

Screenshots

Preview
image
Reader View
image

System Info

OS: Windows 10
Obsidian Version:
image
Plugin Version:
image

@ggstrader ggstrader added bug Something isn't working internal Internal Issue labels Feb 27, 2023
@ggstrader ggstrader changed the title [BUG: Internal] [BUG: Internal] Code blocks don't render in Reader View Feb 27, 2023
@flyingkate
Copy link

flyingkate commented Mar 7, 2023

I have the same issue with a dataviewjs query that is displayed in live preview but not in reading view.


OS: Windows 11
Obsidian Version: v1.1.16
Obsidian Columns Plugin version: 1.4.0

````col-md
flexGrow=2
===
> [!abstract] `$= '[['+moment().format("YYYY-MM-DD")+'|Open Today\'s Note]]'` |  `$= '[['+moment().format("YYYY-[W]ww")+'|Open this Week\'s Note]]'`

> [!faq]- MORGENROUTINE
> **06:30** **| I get ...**

```dataviewjs
dv.table(["Project", "ToDo", "Done", "Progress"],
	dv.pages('"SPACES/projects"')
		.sort(p => p.file.link)
		.map(p => [
			"[[" + p.file.name + "|" + p.aliases + "]]",
			p.tasks_open, 
			p.tasks_done, 
			"<progress value='" + (p.tasks_done / p.tasks_total * 100) + "' max='100'></progress>"])
)
```
````

````col-md
flexGrow=1
===
> [!Example]- DASHBOARDS
> [[dash-areas|Area Dashboard]]

> [!abstract]- HOUSEKEEPING
> **`$= '[['+moment().format("YYYY-[W]ww")+'|Review this Week]]'`**
> **Project Review**
> ---
> **`$= '[['+moment().format("YYYY-MM")+'|Review this Month]]'`**
> **Season Review**
> **`$= '[['+moment().format("YYYY")+'|Review this Year]]'`**

> [!cite]- DATABASES
---
⭕ = Core System Database
🔴 = Workflow (aka Review Cycle Databases)
---
````

@tnichols217
Copy link
Owner

Currently this is effecting the query, dataview, and dataviewjs codeblocks and I am still quite unsure what could be the cause of this problem. It may be an issue on the obsidian API side that I did not understand, and I have reached out to them with no response (you can see in the other issue about the query codeblock).

Additionally, I am swamped and am having a hard time maintaining this plugin, so any PRs for this issue would be appreciated (or any ideas to solve the issue). My latest suspect may be the order in which obsidian prioritizes the codeblock languages, and I'll do some testing on that when I find the time.

@Dartaltram
Copy link

Any news on this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working internal Internal Issue
Projects
None yet
Development

No branches or pull requests

4 participants