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

[question] Multi-line code blocks within {{#code}} helper #110

Open
renatodeleao opened this issue Mar 22, 2017 · 3 comments
Open

[question] Multi-line code blocks within {{#code}} helper #110

renatodeleao opened this issue Mar 22, 2017 · 3 comments

Comments

@renatodeleao
Copy link

renatodeleao commented Mar 22, 2017

Trying to use the {{#code}} helper for a documentation page which has several multi-line code blocks.
Syntax highlighting works as expected good but Indentation gets messed up.

This

<section>
   <div class="presenatitionalClass">
      <div class="anotherPresentationaClass">
         {{#code "JSON"}}
         {
           "key": 2;
           "key2": "value";
         }
         {{/code}}
     </div>
   </div>
</section>

Renders this:
image

Putting the whole block unindented

<section>
   <div class="block">
      <div class="anotherpresentational">
{{#code "JSON"}}
{
  "key": 2;
  "key2": "value";
}
{{/code}}
     </div>
   </div>
</section>

Only removes first line whitespace
otherimage

Any suggestion/help on how to workaround this or if i'm doing something wrong with the content?
Thanks.

@gakimball
Copy link
Contributor

The code helper should strip indent for sure.

As for the un-indented example, not sure what's happening there.

We'll look into both!

@Deckluhm
Copy link

Is that valid to have ; to separate JSON elements? (I'm pretty sure that the answer is "no")

@gakimball
Copy link
Contributor

No, semicolons aren't valid anywhere in JSON, just commas.

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

No branches or pull requests

3 participants