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

Bad white-space formatting of presented source-code that uses tabs #271

Closed
rjgotten opened this issue Mar 16, 2018 · 0 comments
Closed

Bad white-space formatting of presented source-code that uses tabs #271

rjgotten opened this issue Mar 16, 2018 · 0 comments
Assignees
Labels

Comments

@rjgotten
Copy link

rjgotten commented Mar 16, 2018

Don't want to go into the whole religious debate of spaces vs tabs, but some people do use tabs for their scss source code, and currently that causes the presentation of said source code that is included in an item's header section, to come out wrong.

I think the code_block macro defined in utility.macros.njk can do a bit more work to accommodate the tabs-crowd in producing properly formatted source presentation, by consistently converting tabs to two spaces.

Could be as simple as using the replace filter when rendering the content property, i.e. ,

{{ content|replace("\t", "  ")|escape|safe }}
@jgerigmeyer jgerigmeyer self-assigned this Mar 27, 2018
jgerigmeyer added a commit that referenced this issue Mar 28, 2018
* master:
  Upgrade deps (notably webpack4).
  Include dist/ in repo so that package can be run from repo.
  Fix bug if annotations try to access missing `env.herman` [fixes #273]
  Fix bug displaying tabs in `<code>` blocks [fixes #271]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants