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]: html comments in .md files improperly parsed #2510

Open
kennan-simpliphy opened this issue Sep 6, 2024 · 1 comment
Open

[Bug]: html comments in .md files improperly parsed #2510

kennan-simpliphy opened this issue Sep 6, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@kennan-simpliphy
Copy link

kennan-simpliphy commented Sep 6, 2024

Describe the bug

<!-- <script>
</script> -->

This was crashing my app

Steps to Reproduce

---
title: myTitle
queries:
  - myQuery1.sql
  - myQuery2.sql
---

<!-- <script>
</script> -->

^ Even with valid queries, this .md file crashes the app and throws an error saying that the queries are not found. Uncommenting the script tags fixes the problem.

Logs

3:29:39 PM [vite] Internal server error: 'myQuery1' is not defined

System Info

System:
    OS: macOS 14.3
    CPU: (14) arm64 Apple M3 Max
    Memory: 3.98 GB / 36.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.12.2 - ~/.asdf/installs/nodejs/20.12.2/bin/node
    Yarn: 1.22.22 - ~/.asdf/installs/nodejs/20.12.2/bin/yarn
    npm: 10.8.0 - ~/.asdf/plugins/nodejs/shims/npm
  Browsers:
    Chrome: 128.0.6613.120
    Safari: 17.3
  npmPackages:
    @evidence-dev/bigquery: ^2.0.7 => 2.0.7 
    @evidence-dev/core-components: ^4.7.8 => 4.7.8 
    @evidence-dev/csv: ^1.0.12 => 1.0.12 
    @evidence-dev/databricks: ^1.0.7 => 1.0.7 
    @evidence-dev/duckdb: ^1.0.11 => 1.0.11 
    @evidence-dev/evidence: ^39.1.5 => 39.1.5 
    @evidence-dev/motherduck: ^1.0.2 => 1.0.2 
    @evidence-dev/mssql: ^1.0.9 => 1.0.9 
    @evidence-dev/mysql: ^1.1.3 => 1.1.3 
    @evidence-dev/postgres: ^1.0.6 => 1.0.6 
    @evidence-dev/snowflake: ^1.1.0 => 1.1.0 
    @evidence-dev/sqlite: ^2.0.6 => 2.0.6 
    @evidence-dev/trino: ^1.0.8 => 1.0.8

Severity

blocking all usage of Evidence

Additional Information, or Workarounds

No response

@kennan-simpliphy kennan-simpliphy added bug Something isn't working to-review Evidence team to review labels Sep 6, 2024
@archiewood archiewood removed the to-review Evidence team to review label Sep 6, 2024
@csjh
Copy link
Contributor

csjh commented Sep 12, 2024

This is because we have a fairly naive check for whether or not the script tag has been defined. Should work for any comments that don't contain <script>. For now I would suggest commenting out the contents of the script tag rather than the tag itself.

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

No branches or pull requests

3 participants