phibr0 / obsidian-charts

Charts - Obsidian Plugin | Create editable, interactive and animated Charts in Obsidian via Chart.js
https://charts.phib.ro/
GNU Affero General Public License v3.0
592 stars 27 forks source link

[Bug]: Aliased wikilinks in tables aren't being parsed correctly when creating a chart from a table #52

Open Zachatoo opened 2 years ago

Zachatoo commented 2 years ago

Describe the bug

When creating a chart that references a table that has aliased wikilinks in it, the charts are treating the escaped pipe character \| in the aliased wikilinks as table delimiters.

Relevant errors (if available)

No response

Steps to reproduce

  1. Create a new note called "Testing".
  2. Create a table with aliased wikilinks (you can use the following table).
    | column 1          | column 2 |
    | ----------------- | -------- |
    | [[Testing\|test]] | 10       |
    ^testing123
  3. Create a chart using the charts code in the "Code" section into the "Testing" note.
  4. Chart does not show correct name and values are not plotted. image

Expected Behavior

Chart should show correct name and show plotted values.

image

Additional context

No response

Code

type: bar
id: testing123

Operating system

macOS