Skip to content

heex compilation warning and no syntax highlighting between 0.36 - 0.37 #2095

Closed
@bcardarella

Description

@bcardarella

I'm cutting a new release of LVN and we use the heex code fence for syntax highlighting of our projects.

this hasn't been an issue in the past, but today I'm getting this warning during documentation compilation:

warning: crashed while highlighting heex snippet:

<pre><code class="heex">&lt;LiveForm
  id=&quot;my-form&quot;
  phx-change=&quot;form-changed&quot;
  phx-submit=&quot;submit&quot;
&gt;
  &lt;TextField name=&quot;username&quot;&gt;Username&lt;/TextField&gt;
  &lt;SecureField name=&quot;password&quot;&gt;Password&lt;/SecureField&gt;
  &lt;LiveSubmitButton&gt;Submit&lt;/LiveSubmitButton&gt;
&lt;/LiveForm&gt;</code></pre>
  (makeup_eex 2.0.2) lib/makeup/lexers/eex_lexer/application.ex:39: Makeup.Lexers.EExLexer.Application.dynamic_html_lexer/0
  (makeup_eex 2.0.2) lib/makeup/lexers/heex_lexer.ex:257: Makeup.Lexers.HEExLexer.lex/2
  (makeup 1.2.1) lib/makeup.ex:48: Makeup.highlight_inner_html/2
  (ex_doc 0.37.2) lib/ex_doc/doc_ast.ex:223: ExDoc.DocAST.render_code/6
  (ex_doc 0.37.2) lib/ex_doc/doc_ast.ex:181: ExDoc.DocAST.highlight_code_block/6
  (elixir 1.18.0) lib/regex.ex:808: Regex.apply_list/5
  (elixir 1.18.0) lib/regex.ex:803: Regex.apply_list/5
  (elixir 1.18.0) lib/regex.ex:809: Regex.apply_list/5

Here is the document:

<LiveForm
  id="my-form"
  phx-change="form-changed"
  phx-submit="submit"
>
  <TextField name="username">Username</TextField>
  <SecureField name="password">Password</SecureField>
  <LiveSubmitButton>Submit</LiveSubmitButton>
</LiveForm>

Did something change between 0.36 (working) to now? I haven't dug in but if there is now validation happening then that puts us out as our syntax highlighting is identical to heex but we don't validate as heex

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