glasserc / rst2wp

Post to Wordpress using ReStructuredText
11 stars 10 forks source link

More config added #9

Closed fwolf closed 11 years ago

glasserc commented 11 years ago

So you figured out your problem with hard tabs? Sorry I didn't get the chance to look.

I like patch 2. For patch 1, is it possible for the default to be that tabs are an error?

fwolf commented 11 years ago

Hard tab in rst is allowed, but in common sence, when parse to html, tab is converted to space(default 8), so I add this option, you can set 1tab=4spaces.

I have tried set tab_width to -1 (https://github.com/glasserc/rst2wp/issues/6), which keep hard tab in result html, but don't work.

glasserc commented 11 years ago

I don't think rst2wp will output hard tabs in HTML. Why do you want that? HTML is not a whitespace-significant language.

fwolf commented 11 years ago

This is just want to copy rst2html option, a little over design, but maybe usefull elsewhere.

Convert to space is enough for use now, number of space doesn't affect most html result, except content in <pre>.

glasserc commented 11 years ago

I guess this is fine. However, if there are many options like this, it would be better to have it more abstract -- maybe a section in the config which automatically passes through to the parser config.

fwolf commented 11 years ago

Currently I have no more config custimized, rst2wp is good enough for me now.

Readme file less config information, should update, or write comment in default config setting. You may not like second method.

I have 1 more patch https://github.com/fwolf/rst2wp/commit/9a46e355206b3f3769779c5f575792db17477036, which is about :slug: bibliographic field set. It's a bit personal habit, so I leave it on my dev branch https://github.com/fwolf/rst2wp/commits/dev, unless you want merge it.

glasserc commented 11 years ago

I'll take these two but no, I'm not interested in 9a46e35 or automatic slug generation from filenames.