mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-04-26 01:26:00 +03:00
[PR #33] [MERGED] Use template strings for substitution in HTML output #1039
Labels
No labels
expected: maybe someday
expected: next release
expected: release after next
expected: unlikely unless contributed
good first ticket
help wanted
pull-request
scope: all users
scope: windows users
size: easy
size: hard
size: medium
size: medium
status: backlog
status: blocked
status: done
status: idea-phase
status: needs followup
status: wip
status: wontfix
touches: API/CLI/Spec
touches: configuration
touches: data/schema/architecture
touches: dependencies/packaging
touches: docs
touches: js
touches: views/replayers/html/css
why: correctness
why: functionality
why: performance
why: security
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ArchiveBox#1039
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ArchiveBox/ArchiveBox/pull/33
Author: @bardisty
Created: 7/5/2017
Status: ✅ Merged
Merged: 7/5/2017
Merged by: @pirate
Base:
master← Head:add-template-strings📝 Commits (3)
31ec320Use template strings for substitution in HTML output28445d2Remove obsolete note on double-bracketed CSS in templates26b5e4aUse$identifierover${identifier}📊 Changes
4 files changed (+39 additions, -40 deletions)
View changed files
📝
README.md(+0 -2)📝
index.py(+3 -2)📝
templates/index.html(+26 -26)📝
templates/index_row.html(+10 -10)📄 Description
str.format()can only use substitutions identified by braces ({and}). This has the potential to conflict with other code in the HTML template, such as CSS or JavaScript.Template strings can use substitutions identified by
$or${}, e.g.:$identifieror${identifier}. These substitutions won't conflict with CSS or JavaScript, allowing users to write HTML templates that don't require double braces anywhere there's a substitution conflict. This is especially useful when one is using a build tool to generate the final CSS/JavaScript/HTML.https://docs.python.org/3/library/string.html#template-strings
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.