Skip to content

Autodetect issues #30

@platima

Description

@platima

Hey I've found a few issues with autodetect, and wondering if I am doing something wrong or if there are limitations I don't understand? Primarily, many many things autodetect as 'C'.

Eg
WITH employee_ranking AS ( SELECT employee_id, last_name, RANK() OVER (ORDER BY salary DESC) as ranking FROM employee ) SELECT employee_id, last_name, FROM employee_ranking WHERE ranking <= 5 ORDER BY ranking

I'd expect to very clearly be SQL, and then
<meta property="og:description" content="One of the best ways to learn advanced SQL is by reading examples of queries. Check 25 advanced queries that will help you build your SQL skills." /> <meta property="og:type" content="article" /> <meta property="og:url" content="https://learnsql.com/blog/25-advanced-sql-query-examples/" /><meta property="article:published_time" content="2023-02-28T18:00:00&#43;02:00"/> <meta property="article:modified_time" content="2023-02-28T18:00:00&#43;02:00"/><meta property="og:site_name" content="LearnSQL.com" /> <meta property="article:publisher" content="https://www.facebook.com/groups/welearnsql/" /> <meta property="article:section" content="blog" /> <meta property="article:tag" content="sql" /> <meta property="article:tag" content="learn sql" /> <meta property="article:tag" content="online practice" /> <meta property="article:tag" content="advanced sql" />
is quite clearly HTML.

Both auto-detect as 'C' though. Tested with a few releases, same result. Putting at the start obviously works, but is not always how it'll be used.

Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions