Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pubsweet-components
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
3
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
There was a problem fetching the pipeline stages.
Show more breadcrumbs
pubsweet
pubsweet-components
Commits
3f52bad3
Commit
3f52bad3
authored
7 years ago
by
Yannis Barlas
Browse files
Options
Downloads
Patches
Plain Diff
fix that passes tests
parent
c3db234a
No related branches found
No related tags found
1 merge request
!103
Vivliostyle converter
Pipeline
#3122
passed with stage
in 11 minutes and 11 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
packages/Epub/EpubBackend.js
+6
-6
6 additions, 6 deletions
packages/Epub/EpubBackend.js
packages/Epub/process.test.js
+1
-1
1 addition, 1 deletion
packages/Epub/process.test.js
with
7 additions
and
7 deletions
packages/Epub/EpubBackend.js
+
6
−
6
View file @
3f52bad3
const
HTMLEPUB
=
require
(
'
html-epub
'
)
const
HTMLEPUB
=
require
(
'
html-epub
'
)
const
fs
=
require
(
'
fs
'
)
const
fs
=
require
(
'
fs
'
)
const
_
=
require
(
'
lodash
'
)
const
indexOf
=
require
(
'
lodash
/indexOf
'
)
const
sorter
=
require
(
'
./sorter
'
)
const
sorter
=
require
(
'
./sorter
'
)
const
converters
=
require
(
'
./converters
'
)
const
converters
=
require
(
'
./converters
'
)
...
@@ -37,11 +37,11 @@ const EpubBackend = function (app) {
...
@@ -37,11 +37,11 @@ const EpubBackend = function (app) {
stylesRoot
=
`
${
__dirname
}
/themes`
stylesRoot
=
`
${
__dirname
}
/themes`
}
}
let
fontsRoot
=
process
.
cwd
()
+
config
.
epub
.
fontsPath
let
fontsRoot
=
config
.
epub
&&
config
.
epub
.
fontsPath
?
process
.
cwd
()
+
config
.
epub
.
fontsPath
:
null
if
(
!
fs
.
existsSync
(
fontsRoot
))
{
if
(
!
fs
.
existsSync
(
fontsRoot
))
fontsRoot
=
''
fontsRoot
=
''
}
// converters
// converters
const
activeConverters
=
[
req
.
query
.
converter
]
const
activeConverters
=
[
req
.
query
.
converter
]
...
@@ -54,7 +54,7 @@ const EpubBackend = function (app) {
...
@@ -54,7 +54,7 @@ const EpubBackend = function (app) {
.
map
(
fragment
=>
fragment
.
id
)
.
map
(
fragment
=>
fragment
.
id
)
sortedFragments
.
forEach
(
fragment
=>
{
sortedFragments
.
forEach
(
fragment
=>
{
let
found
=
_
.
indexOf
(
partsIds
,
fragment
.
id
)
let
found
=
indexOf
(
partsIds
,
fragment
.
id
)
if
(
found
!==
-
1
)
{
if
(
found
!==
-
1
)
{
fragment
.
number
=
found
+
1
fragment
.
number
=
found
+
1
}
}
...
...
This diff is collapsed.
Click to expand it.
packages/Epub/process.test.js
+
1
−
1
View file @
3f52bad3
...
@@ -14,7 +14,7 @@ test('converts source to html', () => {
...
@@ -14,7 +14,7 @@ test('converts source to html', () => {
<p>Test</p>
<p>Test</p>
</div>
</div>
`
,
`
,
id
:
1
,
id
:
'
1
'
}
}
const
book
=
{
const
book
=
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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