Handle east asian character column width in the importer

Fixes #682
Closes #923
This commit is contained in:
Kyle Fuller 2013-10-08 09:46:40 +01:00
commit f83d0d3b0c
2 changed files with 19 additions and 2 deletions

View file

@ -425,8 +425,10 @@ def feed2fields(file):
def build_header(title, date, author, categories, tags, slug):
from docutils.utils import column_width
"""Build a header from a list of fields"""
header = '%s\n%s\n' % (title, '#' * len(title))
header = '%s\n%s\n' % (title, '#' * column_width(title))
if date:
header += ':date: %s\n' % date
if author: