Comments (12)
When you say it "does not work," what do you mean?
This gives me a djot document as output:
pandoc MANUAL.txt -t json -s | djot -f pandoc -t djot
Are you doing something different from that?
The document won't contain metadata, because djot has no metadata yet.
from djot.js.
from djot.js.
This gave some interesting errors.
It's more helpful if you actually give the errors. I tried it and in this case it's
Error: TypeError: Cannot read properties of undefined (reading 'DefaultDelim')
TypeError: Cannot read properties of undefined (reading 'DefaultDelim')
at PandocParser.fromPandocBlock (/opt/homebrew/lib/node_modules/@djot/djot/lib/pandoc.js:732:54)
at /opt/homebrew/lib/node_modules/@djot/djot/lib/pandoc.js:605:33
at Array.map (<anonymous>)
at PandocParser.fromPandocBlock (/opt/homebrew/lib/node_modules/@djot/djot/lib/pandoc.js:604:43)
at /opt/homebrew/lib/node_modules/@djot/djot/lib/pandoc.js:850:25
at Array.map (<anonymous>)
at PandocParser.fromPandoc (/opt/homebrew/lib/node_modules/@djot/djot/lib/pandoc.js:849:34)
at fromPandoc (/opt/homebrew/lib/node_modules/@djot/djot/lib/pandoc.js:863:38)
at Object.<anonymous> (/opt/homebrew/lib/node_modules/@djot/djot/lib/cli.js:175:43)
at Module._compile (node:internal/modules/cjs/loader:1218:14)%
Is that what you saw? That points to a bug in djot's pandoc conversion, which should be rather easy to fix.
I had no trouble converting from docx, but if you did stumble across an error, please report it with full details and ideally a minimal docx we can use to reproduce it.
None of this has to do with metadata, I think.
from djot.js.
from djot.js.
I suspect the fix I just pushed will take care of this issue, but it's hard to tell unless you can give us a file that suffices to reproduce it.
If you have a git clone of this repository you can try
$ git pull
$ npm install -g .
and see if that helps.
from djot.js.
from djot.js.
A Danish version would be just fine.
from djot.js.
from djot.js.
This converted without errors using
pandoc ~/Downloads/vers1.html -t json -s | djot -f pandoc -t djot
If it doesn't work for you, then probably you aren't running the development version of djot.
from djot.js.
from djot.js.
I'm guessing you have a <section>
with an id, and the first element of the section is a heading like <h2>
with an id. Both are given here, but the second will take precedence. Sections are implicit in djot.
from djot.js.
from djot.js.
Related Issues (20)
- Add docstrings HOT 6
- Update pandoc API version emitted HOT 4
- URLs with parenthesis break parser HOT 11
- TaskListItem: "undefined" ? HOT 6
- Caption parsing is buggy HOT 3
- Include package-lock.json in the repository
- Issues with ellipses and dashes when converting to pandoc format HOT 1
- Multiline references HOT 11
- multiline link urls no longer trimmed and concatenated HOT 4
- Shared HTML id in multiple references to the same footnote HOT 7
- Clarification around list items HOT 6
- Make library available via CDN HOT 1
- Deno Third Party Module HOT 2
- Can we remove auto generated anchor in renderDjot output? HOT 6
- Crash when render tasklist as pandoc HOT 2
- No renderer for span when rendering as djot HOT 1
- Add recursive file inclusion HOT 2
- Error when trying to run `npm run test` HOT 2
- question: Add class name to all sections HOT 3
- Add comment in AST HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from djot.js.