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

Code blocks are rendered incorrectly if they come after text without a new line #14

Closed
MrEbbinghaus opened this issue Apr 13, 2022 · 2 comments · Fixed by #15
Closed
Assignees
Labels
bug Something isn't working

Comments

@MrEbbinghaus
Copy link

    Example:
    ```clojure 
    (def spouse 
      {:name "Alice"
       :profile-pic-href "alice.png"})
    ```

gets rendered like:

image

HTML:

<p>Example:
<code></code>`clojure 
(def spouse 
  {:name "Alice"
   :profile-pic-href "alice.png"})</p>
@MrEbbinghaus
Copy link
Author

Same when there is no empty line after the code block:

    ```clojure
    :foo
    ```
    Now the ugly update function from above becomes as simple as:
    
    ```clojure
    :bar
    ```

renders like:
image

@askonomm
Copy link
Owner

This is by design. Clarktown parses blocks, and blocks are created by having two line breaks in-between. Thus, your example is just one block of text as far as Clarktown is concerned and not two different ones. And since the block starts with regular text, it determines it's just a paragraph and not a code block, which starts with with the uptick characters. You really want to have two line breaks between blocks.

To make this work would require some significant rewrite of the underlying architecture as the whole premise is built under the idea that blocks are separated by two newlines.

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

Successfully merging a pull request may close this issue.

2 participants