Skip to content
This repository has been archived by the owner on Feb 21, 2019. It is now read-only.

How exactly does one use the getIndent option? #44

Open
Nantris opened this issue Jul 8, 2018 · 7 comments
Open

How exactly does one use the getIndent option? #44

Nantris opened this issue Jul 8, 2018 · 7 comments
Labels

Comments

@Nantris
Copy link

Nantris commented Jul 8, 2018

Can anyone let me know what the expected input for the function is? I tried passing just a string value of (two spaces) but that didn't have any effect.

@jfrolich
Copy link

Same here

@Soreine
Copy link
Contributor

Soreine commented Aug 19, 2018

Maybe it's convoluted to have it as a function... but you need to pass a function of the current value

Here is what you could do:

getIndent: value => '  '

Do you have tips for improvement on the documentation about that option ?

@Nantris
Copy link
Author

Nantris commented Aug 19, 2018

@Soreine thanks very much for your reply. Unfortunately I tried that too and it has no effect for me. No errors, but still 4 spaces for indentation.

This is my options object:

{
  containerType: 'codeBlock',
  lineType: 'codeLine',
  exitBlockType: 'paragraph',
  selectAll: true,
  getIndent: value => '  ',
};

Any thoughts as to what the problem could be here?

@Soreine Soreine removed the question label Aug 20, 2018
@Soreine
Copy link
Contributor

Soreine commented Aug 20, 2018

Alright, then it's probably a bug. I'll see where it comes from. The plugin also has an indent auto-detection feature, maybe it's conflicting here with the option, though it should not.

@Soreine Soreine reopened this Aug 20, 2018
@Soreine Soreine added the bug label Aug 20, 2018
@Nantris
Copy link
Author

Nantris commented Aug 20, 2018

@Soreine thanks very much for taking the time to look into this. I tried to track it down back when I filed this issue, but I wasn't able to find the source of this issue. Everything seemed right except the output.

@xndyz
Copy link

xndyz commented Nov 26, 2018

Is this still a bug, or are we able to change it to use two spaces for indenting now?

@Nantris
Copy link
Author

Nantris commented Nov 26, 2018

Still a bug last I checked. If you find a way to fix it, I'd be interested.

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

No branches or pull requests

4 participants