Skip to content
This repository has been archived by the owner on Jul 6, 2023. It is now read-only.

Parsing markdown code blocks as real code #190

Open
fazibear opened this issue Mar 7, 2023 · 1 comment
Open

Parsing markdown code blocks as real code #190

fazibear opened this issue Mar 7, 2023 · 1 comment

Comments

@fazibear
Copy link

fazibear commented Mar 7, 2023

Example markdown file:

-- start of .md file --

Hello code

this is nice piece of coce

defmodule Test do
  def render(assigns) do
    ~L"""
      <h3><%= @current %></h3>
    """
  end

-- end of .md file ---

and the warning:

warning: assign @current not available in EEx template. Please ensure all assigns are given as options. Available assigns: [:author, :author_image, :date, :dependency_chain, :env, :extension, :image, :input_file, :permalink, :preprocessor, :tags, :title]

Looks like elixir trying to parse code in code block of md file like it's read eex.

@fazibear fazibear changed the title Parsing markdown as code blocks Parsing markdown code blocks as real code Mar 7, 2023
@gabrielpoca
Copy link
Member

Yeah, that's the issue! I wonder if there's a way to "escape" that elixir, or do I have to execute the elixir in the parser.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants