Skip to content

Commit

Permalink
Use the new indent parameter instead of indenting manually
Browse files Browse the repository at this point in the history
  • Loading branch information
kovidgoyal committed Nov 12, 2024
1 parent 77d4d2a commit 7a3571c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions manual/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,10 @@ def formatter_funcs():
ffml = FFMLProcessor()
all_funcs = formatter_functions().get_builtins()
for func_name, func in all_funcs.items():
text = ffml.document_to_rst(func.doc, func_name)
# indent the text since :ffdoc: is used inside lists
# if we need no indent we can create a new role like
# :ffdoc-no-indent:
text = '\n '.join(text.splitlines())
text = ffml.document_to_rst(func.doc, func_name, indent=1)
ans[func_name] = text.strip()
db.close()
del db
Expand Down
3 changes: 2 additions & 1 deletion src/calibre/utils/formatter_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
from calibre.utils.date import UNDEFINED_DATE, format_date, now, parse_date
from calibre.utils.icu import capitalize, sort_key, strcmp
from calibre.utils.icu import lower as icu_lower
from calibre.utils.localization import _ as xlated, calibre_langcode_to_name, canonicalize_lang
from calibre.utils.localization import _ as xlated
from calibre.utils.localization import calibre_langcode_to_name, canonicalize_lang
from calibre.utils.titlecase import titlecase
from polyglot.builtins import iteritems, itervalues

Expand Down

0 comments on commit 7a3571c

Please sign in to comment.