
Security News
npm ‘is’ Package Hijacked in Expanding Supply Chain Attack
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.
wdiff
First install Pandoc and npm, then run:
npm install -g pandiff
pandiff test/old.md test/new.md
{~~Old~>New~~} Title
====================
{----}
{++++}
1. Lorem ipsum dolor {++sit ++}amet
2. {++[consectetur adipiscing
elit](https://en.wikipedia.org/wiki/Lorem_ipsum)++}
3. Lorem{-- ipsum--} dolor sit amet
I really love *italic {~~fonts~>font-styles~~}* {~~here.~>there.~~}
``` diff
print("Hello")
-print("world.")
+print("world!")
print("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt")
```
Don’t go around saying {--to people that --}the world owes you a
living. The world owes you nothing. It was here first. {~~One~>Only
one~~} thing is impossible for God: To find{++ any++} sense in any
copyright law on the planet. Truth is stranger than fiction, but it is
because Fiction is obliged to stick to possibilities; Truth isn’t.
pandiff --help
Usage: pandiff [OPTIONS] FILE1 FILE2
--bibliography=FILE
--csl=FILE
--columns=NUMBER
--extract-media=PATH
-F, --filter=STRING
-f, --from=FORMAT
-h, --help
--highlight-style=STRING
--lua-filter=FILE
--template=STRING
--mathjax=BOOL
--mathml=BOOL
-o, --output=FILE
--pdf-engine=STRING
--reference-dic=FILE
--reference-links
--resource-path=PATH
-s, --standalone
-t, --to=FORMAT
-v, --version
--wrap=STRING
--metadata
Configure git by running the following commands:
git config --global difftool.pandiff.cmd 'pandiff "$LOCAL" "$REMOTE"'
git config --global alias.pandiff 'difftool -t pandiff -y'
Now you can use git pandiff
wherever you would usually use git diff
.
pandiff old.md new.md -s -o diff.html
pandiff old.md new.md -o diff.pdf
pandiff old.md new.md -o diff.docx
pandiff test/track_changes_move.docx
Here is some text.
{++Here is the text to be moved.++}
Here is some more text.
{--Here is the text to be moved.--}
You can run pandiff inside a docker container locally on your machine by mounting the needed directory as a volume, using the following command.
docker run -v ~/documents/my-md-documents:/data davidar/pandiff -o diff.pdf old.md new.md
The docker image also allows you to create diff views inside github actions or a gitlab ci/cd pipeline.
name: Markdown Diff
on:
push:
paths:
- '**.md'
workflow_dispatch:
jobs:
compile-markdown-to-pdf:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Run pandiff
run: |
docker run --rm \
-v ${{ github.workspace }}:/work \
-w /work \
davidar/pandiff \
pandiff -o diff.pdf old.md new.md
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: diff-pdf
path: diff.pdf
stages:
- diff
compile_markdown_to_pdf:
stage: compile
image:
name: davidar/pandiff
entrypoint: ["/bin/sh", "-c"]
script:
- pandiff -o diff.pdf old.md new.md
artifacts:
paths:
- diff.pdf
FAQs
Prose diffs for any document format supported by Pandoc
The npm package pandiff receives a total of 143 weekly downloads. As such, pandiff popularity was classified as not popular.
We found that pandiff demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.
Security News
A critical flaw in the popular npm form-data package could allow HTTP parameter pollution, affecting millions of projects until patched versions are adopted.
Security News
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.