should parse_content
and parse_content_path
also accept an optional Page
object
#444
kjaymiller
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently in the
BasePageParser
, parse_content and parse_content_path both only take a single input (for no particular reason).Currently only
parser_extras
is only used inBasePageParser.parse
.This is fine but with an idea of a
filter
extra this is best if applied as early as possible to reduce.For Example:
Filtering doesn't happen until
page.Parser.parse
is called so data as stored has the filtered out values. If you referenced the values before and after that page was rendered, you would get different values.Potential solutions
Option 1
Add the
Page
attribute to be available inparse_content
andparse_content_path
. This would ensure that the onlydata
that is present is the same, but it wouldn't preserve the original data (which you could potentially still call manually)Option 2
Save the data in a new attribute
If I had to choose between the two I would choose option-1. But perhaps I'm missing an option.
Beta Was this translation helpful? Give feedback.
All reactions