NicoNekoru / obsidan-advanced-table-xt

Plugin that adds features to tables in obsidian including merging, vertical headers, and custom css
Apache License 2.0
99 stars 5 forks source link

Issues with table rendering: extra <p>s and lost html markup #8

Closed voltel closed 1 year ago

voltel commented 1 year ago

During table conversion from markdown to html, an html <p> elements are inserted by the plugin inside the table cells. I find this unexpected and undesirable. Could you please consider and remove unspecified elements from the table cells?

On a related issue. At the moment, standard table rendering allows a certain mix of markdown and html markup. This works with tables as well. For example, the following markup would be properly rendered:

> Number of patients (%) | Drug 1<br>(n=130) | Drug 2<br>(n=128)
> ----|:----:|:----: 
> **Total number of TEAEs** | 593  | 591 
> <div class="tab">Study drug-related</div> | 74 (57) | 64 (50) 

Alas, during the plugin rendering those html elements are lost. Can this be fixed?

NicoNekoru commented 1 year ago

This should be fixable. The root of the problem is that I am using the markdown converter+renderer built into Obsidian's API which isn't the most ideal. I suspect this is also the cause of #7 and I will try to migrate to a different markdown parser with the same featureset

NicoNekoru commented 1 year ago

I didn't end up changing the markdown renderer but instead used a hacky solution of removing the <p>s. This problem is now resolved by disabling this in settings:

image
NicoNekoru commented 1 year ago

nvm I didn't actually finish the whole issue - html rendering now moved to #13