Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the ability to substitute in a pubyear #67

Merged
merged 3 commits into from Jan 18, 2018

Conversation

@domenic
Copy link
Member

commented Jan 12, 2018

Useful for an auto-updating copyright statement.


This code feels suboptimal in a few ways, mainly that it duplicates the DecodeDate call with the pubdate section above it. I couldn't figure out how to deduplicate though; the scoping inside this massive function confused me too much :(. This seems good enough for now.

For the record I also tried to replace the span entirely with a new text node, but got an EAccessViolation exception: Access violation.

Add the ability to substitute in a pubyear
Useful for an auto-updating copyright statement.
@annevk

This comment has been minimized.

Copy link
Member

commented Jan 18, 2018

I pushed a commit that results in less duplication.

@foolip
foolip approved these changes Jan 18, 2018
Copy link
Member

left a comment

LGTM % some some deduplication

begin
ClassName := Element.GetAttribute('class').AsString;

This comment has been minimized.

Copy link
@foolip

foolip Jan 18, 2018

Member

Hoisting this up to inside a if (Element.IsIdentity(nsHTML, eSpan) and indenting a bit would be less duplication.

@foolip
foolip approved these changes Jan 18, 2018

@annevk annevk merged commit 6eb5f3c into master Jan 18, 2018

@annevk annevk deleted the pubyear branch Jan 18, 2018

@domenic

This comment has been minimized.

Copy link
Member Author

commented Jan 18, 2018

Nice, thanks for the fixes both.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants
You can’t perform that action at this time.