Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
rednerd
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
orus-io
rednerd
Commits
72d129894f79
Commit
72d129894f79
authored
3 years ago
by
Christophe de Vienne
Browse files
Options
Downloads
Patches
Plain Diff
fix engines priorities so that html->pdf is done by wpd by default (ie, always)
parent
d88a04b8410e
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
HISTORY.rst
+5
-0
5 additions, 0 deletions
HISTORY.rst
engines/wpd/engine.go
+1
-1
1 addition, 1 deletion
engines/wpd/engine.go
rendering/registry.go
+4
-0
4 additions, 0 deletions
rendering/registry.go
with
10 additions
and
1 deletion
HISTORY.rst
+
5
−
0
View file @
72d12989
Release history
===============
0.3.3
-----
- fix engines priorities so that html->pdf is done by wpd by default (ie, always)
0.3.2 (2020-04-22)
------------------
...
...
This diff is collapsed.
Click to expand it.
engines/wpd/engine.go
+
1
−
1
View file @
72d12989
...
...
@@ -32,7 +32,7 @@
Type
:
"Weasyprint"
,
Description
:
`Render HTML to PDF with weasyprint.`
,
Transitions
:
[]
rendering
.
EngineTransitionInfo
{
{
FromType
:
"text/html"
,
ToType
:
"application/pdf"
,
Priority
:
1
.0
},
{
FromType
:
"text/html"
,
ToType
:
"application/pdf"
,
Priority
:
2
.0
},
},
Metadata
:
[]
rendering
.
EngineMetadataInfo
{
{
...
...
This diff is collapsed.
Click to expand it.
rendering/registry.go
+
4
−
0
View file @
72d12989
...
...
@@ -4,6 +4,7 @@
"context"
"errors"
"fmt"
"sort"
)
// ErrDuplicateName is returned by EngineRegistry.Register if and engine with
...
...
@@ -189,6 +190,9 @@
}
}
}
sort
.
Slice
(
entries
,
func
(
i
,
j
int
)
bool
{
return
entries
[
i
]
.
priority
>
entries
[
j
]
.
priority
})
var
engines
=
make
([]
Engine
,
0
,
len
(
entries
))
for
_
,
entry
:=
range
entries
{
engines
=
append
(
engines
,
entry
.
engine
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment