mirror of
https://github.com/Kozea/WeasyPrint.git
synced 2024-10-04 16:07:57 +03:00
Fix some comments
This commit is contained in:
parent
f78eb3763e
commit
17abfbd1c9
@ -1301,7 +1301,7 @@ def validate_content_list_token(token):
|
||||
prototype = (name, [a.type for a in args])
|
||||
args = [getattr(a, 'value', a) for a in args]
|
||||
if prototype == ('attr', ['IDENT']):
|
||||
# TODO: remove this line when attr is supported in pages.py
|
||||
# TODO: remove this line when attr is supported in build.py
|
||||
raise InvalidValues
|
||||
return (name, args[0])
|
||||
elif prototype in (('content', []), ('content', ['IDENT'])):
|
||||
@ -1312,13 +1312,13 @@ def validate_content_list_token(token):
|
||||
return (name, args[0])
|
||||
elif prototype in (('counter', ['IDENT']),
|
||||
('counters', ['IDENT', 'STRING'])):
|
||||
# TODO: remove this line when counters are supported in pages.py
|
||||
# TODO: remove this line when counters are supported in build.py
|
||||
raise InvalidValues
|
||||
args.append('decimal')
|
||||
return (name, args)
|
||||
elif prototype in (('counter', ['IDENT', 'IDENT']),
|
||||
('counters', ['IDENT', 'STRING', 'IDENT'])):
|
||||
# TODO: remove this line when counters are supported in pages.py
|
||||
# TODO: remove this line when counters are supported in build.py
|
||||
raise InvalidValues
|
||||
style = args[-1]
|
||||
if style in ('none', 'decimal') or style in counters.STYLES:
|
||||
|
@ -95,21 +95,22 @@ class LayoutContext(object):
|
||||
self.excluded_shapes = None
|
||||
|
||||
def get_string_set_for(self, name, keyword=None):
|
||||
""" Resolve value of string function (as set by string set)
|
||||
"""Resolve value of string function (as set by string set).
|
||||
|
||||
We'll have something like this that represents all assignments
|
||||
on a given page
|
||||
{1: [u'First Header'], 3: [u'Second Header'],
|
||||
4: [u'Third Header', u'3.5th Header']}
|
||||
We'll have something like this that represents all assignments on a
|
||||
given page:
|
||||
|
||||
Value depends on current page
|
||||
http://dev.w3.org/csswg/css-gcpm/#funcdef-string
|
||||
{1: [u'First Header'], 3: [u'Second Header'],
|
||||
4: [u'Third Header', u'3.5th Header']}
|
||||
|
||||
:param name: the name of the named string.
|
||||
:param keyword: indicates which value of the named string to use.
|
||||
Default is the first assignment on the current page
|
||||
else the most recent assignment (entry value)
|
||||
:returns: text
|
||||
Value depends on current page.
|
||||
http://dev.w3.org/csswg/css-gcpm/#funcdef-string
|
||||
|
||||
:param name: the name of the named string.
|
||||
:param keyword: indicates which value of the named string to use.
|
||||
Default is the first assignment on the current page
|
||||
else the most recent assignment (entry value)
|
||||
:returns: text
|
||||
|
||||
"""
|
||||
last = keyword == "last"
|
||||
|
Loading…
Reference in New Issue
Block a user