mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Handle east asian character column width in the importer
Fixes #682 Closes #923
This commit is contained in:
parent
9ebe06156c
commit
f83d0d3b0c
2 changed files with 19 additions and 2 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue