tnichols217 / obsidian-columns

GNU General Public License v3.0
200 stars 9 forks source link

[BUG: External] Multiple Obsidian Buttons not rendered in single column #28

Closed errbufferoverfl closed 2 years ago

errbufferoverfl commented 2 years ago

Describe the bug

Obsidian Buttons is a plugin that allows you to create buttons using Markdown code block syntax, e.g.

```button
name 📖 Mark as Reading
type line(8) template  
action reading-date-started-template
replace [8,8]  

When you create a button, in a `col` or `col-md` the closing back ticks on the button definition get interpreted as the closing of the previous column. Which means that only the first button is rendered in the column while the others fold over to a new column:
<img width="957" alt="Screen Shot 2022-06-22 at 12 13 41 pm" src="https://user-images.githubusercontent.com/26612068/174928625-2dbab3f8-3b8e-4d6f-8471-4bfa297e144a.png">

## Steps To Reproduce
- Install [Obsidian Buttons](https://github.com/shabegom/buttons)
- In a blank file create a new `col` structure and in the first column embed a file, in the second put some markdown and three buttons, for example:
![[opening_data.pdf]]
```col-md

## 📕 About the Book
- 👤 **Author**: [[John Doe]]
- 🗃 **Genre**: [[Fiction]]
- 🗓 **Published**: 2020
- ✅ **Date Finished**: null
- ⭐️ **Rating**: 5/5
***

```button
name 📖 Mark as Reading
type line(8) template  
action reading-date-started-template
replace [8,8]  
name 📑 Create New Literature Note
type note(zettelkasten-template, split) note  
action zettelkasten-template
name 🎊 Mark as Complete
type line(10) template  
action reading-date-finished-template
replace [10,10]

````



*Note:* Remove the leading backslash when copying over to Obsidian, it's just included to escape Github's code snippet escaping.

I've tried using 4 backticks to close the buttons and many other variations but I've not been able to find a combination that gets the effect that I want where I have a two column layout, with the embed on the left, some Markdown and then three buttons on the right.

## Expected behavior
I would that there is some way to indicate to Obsidian Columns that the closing button back ticks are not to be interpreted as the end of a column.

## System Info
OS: macOS Monterey Version 12.4 (21F79)
Obsidian Version: v0.14.15
Plugin Version: 1.1.8

### Other plugin information
Plugin Name: [Obsidian Buttons](https://github.com/shabegom/buttons)
Github Link to Plugin: https://github.com/shabegom/buttons
Plugin Version: 0.4.16

## Additional information or notes
Having a look over the other issues it sounds like fixing this by be blocked by the same problem in #15 but I'm not too sure 😅
tnichols217 commented 2 years ago

When nesting additional codeblocks, don't forget to add additional back ticks to enclosing codeblocks. For example:

`````col
````col-md
# column 1
```button
(Your button code cuz I don't know how to use that plugin)
````col-md
# column 2

Sorry if my syntax isn't exactly correct as i am on mobile atm

tnichols217 commented 2 years ago

As for your reference to #15 it is a separate issue as the query codeblock is an internal codeblock, not provided by a plugin and it won't get rendered by the internal Markdown renderer.renderMarkdown method.

errbufferoverfl commented 2 years ago

Thank you so much! That works exactly as expected, thank you for the fast resolution!

tnichols217 commented 2 years ago

No problem!