Skip to content

Commit

Permalink
Merge 9d23988 into b3d6625
Browse files Browse the repository at this point in the history
  • Loading branch information
Scrum committed Oct 9, 2020
2 parents b3d6625 + 9d23988 commit d6da881
Show file tree
Hide file tree
Showing 11 changed files with 2,849 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"rules": {
"indent": [2, 4, {"SwitchCase": 1}],
"quotes": [2, "single"],
"linebreak-style": [2, "unix"],
"linebreak-style": "off",
"semi": [2, "always"],
"camelcase": [2, {"properties": "always"}],
"brace-style": [2, "1tbs", {"allowSingleLine": true}]
Expand Down
12 changes: 12 additions & 0 deletions .github/funding.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# These are supported funding model platforms

github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: posthtml
open_collective: posthtml
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
37 changes: 37 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Actions Status
on:
pull_request:
types: [opened, synchronize]
branches:
- master

jobs:
run:
name: Node ${{ matrix.node }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
node: [10, 12, 14]
os: [ubuntu-latest, windows-latest]

steps:
- name: Clone repository
uses: actions/checkout@v2

- name: Set Node.js version
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}

- name: Install npm dependencies
run: npm ci

- name: Run tests
run: npm run test

- name: Run Coveralls
uses: coverallsapp/github-action@master
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ node_modules
# Optional REPL history
.node_repl_history

package-lock.json
.nyc_output
3 changes: 3 additions & 0 deletions .nycrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"reporter": ["lcov", "text"]
}
5 changes: 0 additions & 5 deletions .travis.yml

This file was deleted.

3 changes: 2 additions & 1 deletion lib/imgAutosize.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const url = require('url');
const path = require('path');
const http = require('http');
const https = require('https');
const normalizePath = require('normalize-path');
const imageSize = require('image-size');
const ratio = require('./ratio.js');

Expand Down Expand Up @@ -94,7 +95,7 @@ function translatePath(projectRoot, htmlRelativePath, imgPath, isQuestionMarkAsV
return imgAbsolutePath.replace(/\?[^/]*/, '');
}

return imgAbsolutePath;
return normalizePath(imgAbsolutePath);
}

function getImageDimensions(imgPath) {
Expand Down

0 comments on commit d6da881

Please sign in to comment.