aigis-styleguide / aigis

CSS Styleguide Generator

Home Page:http://aigis-styleguide.github.io/aigis/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Indent in code sample flattened.

funyapu opened this issue · comments

Issue summary

Indent in code sample had been disappeared in html/jade syntax.

/*

---
name: Flexbox
category:
  - Component/Flex
tag:
  - util

---
表組みレイアウト

```html
<div data-flexbox-grid>
  <div>
    指定なし
  </div>
  <div>
    指定なし
  </div>
</div>
```
*/

localhost_8080_doc_styleguide_category_component_flex_index_html_

## Note - The output for the code sample section is different from the example codes in repo. # env
Node: v4.4.5
npm: 3.10.1
aigis: 1.1.4 / 1.1.2 / 1.1.0 (works in 1.0.4)

@funyapu Which template engine for your style guide did you use? Could you show me your aigis_config.yml?

Following screen shot is my test on aigis 1.1.4 with ejs.

image

@geckotang Sorry for late reply. I chose jade.

Here is my aigis_config.yml just for incase.

##
# Styleguide tool
##
#
# The directory containing the source files to parse recursively
source: 
  - resources/assets/stylus/portal

# The directory that aigis will build to
dest: ./public/doc/styleguide

# The assets needed to build the docs
# You may put doc related assets here too: images, css, etc.
dependencies:
  - ./resources/assets/aigis/aigis_assets

# The directory containing the tempalte files to generate pages
# It must contain 'layout.xxx' and 'index.xxx' (.ejs or .jade or .hbs)
template_dir: ./resources/assets/aigis/template_jade
template_engine: jade
color_palette: false

I think it occurred by CSS that maybe depends on white-space property.

@funyapu
Could you check elements styles of code and pre ?

Hi @nakajmg .
Sorry for late come back.

I had compared 1.1.5 and 1.0.4 and figured out it's not matter of white-space...
Aigis printed out 2 spaces for indent on 1.0.4, but not in 1.1.5.

1.0.4

2016-09-11 18 14 18

1.1.5

2016-09-11 18 31 22

code

  /*
 ---
 name: Normal Panel
 category:
   - Layout/Page
 ---
 ¥```html
 <div data-content-body="normal" data-content-layout="normal-panel">
   <div data-input-panel="item-edit" data-panel="">
     通常のメインコンテナ
   </div>
 </div>
 ¥```
 */

conf

##
# Styleguide tool
##
#
# The directory containing the source files to parse recursively
source: 
  - resources/assets/stylus/portal

# The directory that aigis will build to
dest: ./public/doc/styleguide

# The assets needed to build the docs
# You may put doc related assets here too: images, css, etc.
dependencies:
  - ./resources/assets/aigis/aigis_assets

# The directory containing the tempalte files to generate pages
# It must contain 'layout.xxx' and 'index.xxx' (.ejs or .jade or .hbs)
template_dir: ./resources/assets/aigis/template_jade
template_engine: jade
color_palette: false

@funyapu Sorry, I couldn't find the problem. If possible, I'd be grateful if you could send me your project file.

Don't know why, but looks it's been fixed.
Might be because I was using molokai for template_theme...