Comments (3)
Hi @nicolemors and team!
@mrgerardorodriguez has been looking at this issue, which I had first diagnosed as something fairly simple. The fabricator
project has its own .editorconfig
, which conflicts with ours—it designates 4-space tabs as indents. Looking at your example, @nicolemors, I immediately assumed the problem was with that.
We hadn't yet replaced the .editorconfig
in our fork of fabricator (upon which this repo is based but not forked) because we hadn't at that time made the concrete decision that, yes, we want to take over maintenance on this fork for sure. Swapping in our .editorconfig
prematurely would have made the source fork miserable to work with and cause all sorts of conflicty commits.
We should have probably replaced the .editorconfig
once we started this project. Which we still will. But it turns out that that is not the problem here.
Some of us know that fabricator
also involves an external npm package fabricator-assemble. We don't modify that external package as part of our design ethic here; we treat it as external and not ours.
Part of what that external module does, however, is "beautify" HTML in code examples using js-beautify
. Part of that process involves an options object that has nothing to do with .editorconfig
at all...it's its own config. So you can see from fabricator-assemble
's source that their default options for this are, like their .editorconfig
, wrong. Fortunately, like other options in fabricator-assemble
, you can pass these options when invoking the task via gulp
.
beautifier: {
indent_size: 1,
indent_char: ' ',
indent_with_tabs: true
},
Also while investigating this issue, @mrgerardorodriguez found that while Atom's .editorconfig
package is fine with an .editorconfig
that looks like:
indent_style = space
indent_size = 2
charset = utf-8
end_of_line = lf
insert_final_newline = true
(Our organization-wide editorconfig
), Sublime needs
[*]
indent_style = space
indent_size = 2
charset = utf-8
end_of_line = lf
insert_final_newline = true
(note wildcard). That is, Sublime needs to be able to match on the file name/type before applying something. It's possible that the omission of the wildcard in our current one is actually bad/wrong, so that's another side effect of this investigation—we'll want to update our boxen
dotfiles version of editorconfig
accordingly. I'll track that separately.
I'd like to reduce the scope of this issue to:
- Replacing the project's
.editorconfig
with our organization one, with the wildcard amendment - Fixing any wildly terrible indent in source for commits in this repo only (trying to convert all fabricator source to our editorconfig conventions would be silly and bad).
Fixing the output as actually reported here—I'll open a different issue for that because the cause is separate from the editorconfig stuff.
To clarify, this fix won't fix the weird indent yet on syntax-highlighted HTML. More soon on that.
from cloudfour.com-patterns.
/cc @tylersticka @lharding @erikjung @mrgerardorodriguez @saralohr There's some good info for y'all here.
from cloudfour.com-patterns.
Changes have been merged! :D
from cloudfour.com-patterns.
Related Issues (20)
- Adjust `o-deck` column minimum width based on use cases that shipped HOT 2
- Comment component docs in Storybook cause the browser to hang HOT 8
- Image block captions should be able to extend past the width of the image HOT 3
- Add ability to limit video width HOT 3
- Tables in comments are unstyled
- Allow Group block to use o-rhythm class
- Unable to require/import files other than main export in Node HOT 2
- [Contact Page] Make WordPress font size `big` utility responsive
- [Contact Page] Download icon
- [Contact Page] Add `c-input` modifier for more padding HOT 1
- Create Highlight theme in preparation for server-side rendering HOT 4
- Explore updates to our fluid type calculations for simplicity and accessibility
- Explore alternate button pointer effects
- Media-text block not handling most common use case very well HOT 1
- Embed block contents do not fill their container
- I would love a "Side Note" block
- Radio component
- Quote citation styles intended for WordPress blocks are leaking out to all blockquotes
- Inline code color has too little contrast against lightest gray
- Should we disable the CSSNano calc optimization? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cloudfour.com-patterns.