Comments (7)
@DianaLease Can we consider this issue resolved?
Yes, works for me!
from markdown-transform.
@DianaLease I don't think I was thinking straight last night, and after going down a rabbit's hole for a bit, I realised there is an easy way to get the clause text already:
Instead of going directly from CiceroMark DOM to CommonMark text with:
ciceroMarkTransformer.toMarkdown(clauseNode)
Instead generate the CommonMark DOM then get the text:
ciceroMarkTransformer.toCommonMark(clauseNode).text;
You should be able to test that. Let me know if it works, and I will then remove the clauseText
field from the Clause node.
from markdown-transform.
@DianaLease I don't think I was thinking straight last night, and after going down a rabbit's hole for a bit, I realised there is an easy way to get the clause text already:
Instead of going directly from CiceroMark DOM to CommonMark text with:
ciceroMarkTransformer.toMarkdown(clauseNode)
Instead generate the CommonMark DOM then get the text:
ciceroMarkTransformer.toCommonMark(clauseNode).text;
You should be able to test that. Let me know if it works, and I will then remove the clauseText
field from the Clause node.
from markdown-transform.
Recapping an outside convo here -
The above proposed solution produces the text but with the variable syntax still present. It would be useful to have a way to pass { wrapVariables: false }
as an argument to the toCommonMark
method, similar to how it can currently be passed to the toMarkdown
method.
Scratch that. I was passing it as the second argument, but it works when passed as the third argument.
from markdown-transform.
@DianaLease I don't think I was thinking straight last night, and after going down a rabbit's hole for a bit, I realised there is an easy way to get the clause text already:
Instead of going directly from CiceroMark DOM to CommonMark text with:
ciceroMarkTransformer.toMarkdown(clauseNode)
Instead generate the CommonMark DOM then get the text:
ciceroMarkTransformer.toCommonMark(clauseNode).text;
You should be able to test that. Let me know if it works, and I will then remove the
clauseText
field from the Clause node.
Adding the call to clarify what to do to get the text without variable tags:
ciceroMarkTransformer.toCommonMark(clauseNode, 'json', { wrapVariables: false }).text;
from markdown-transform.
I have added a method to encapsulate the clause text extraction:
ciceroMarkTransformer.getClauseText(clauseNode, { wrapVariables: BOOLEAN })
This will:
- regenerate the clause text (with or without wrapped variables)
- remove single trailing new line due to code blocks encodings in CommonMark
- raise an exception for non-Clause nodes
from markdown-transform.
clauseText
field from CiceroMark has been removed. Will ship with release 0.6.0
@DianaLease Can we consider this issue resolved?
from markdown-transform.
Related Issues (20)
- [Build] Failing builds due to network timeouts on model loading HOT 6
- Unable to find module on npm install HOT 1
- Template Signature in `ciceromark_parsed` HOT 5
- Styling of the clause block HOT 7
- Removal Container Content Control HOT 1
- Update of js-dom dependency from 15.2.1 to 16.4.0 HOT 1
- pdf transform: bold and italics do not work HOT 1
- Refactor the transfomer(OOXML<->CiceroMark)
- Unicode fonts for pdf transform HOT 4
- Pdf Transform: Generation for nested lists without initial paragraph is broken
- Pdf transform: link with formatting do not get properly translated
- `markus --help` leads to `Cannot find module 'mkdirp'` on fresh install on mac HOT 2
- Whitespace are wrongly decoded when transforming pdf to html HOT 4
- Characters `ti` replaced by `(` in pdf HOT 1
- Pdf file transform in markdown leads to almost empty file HOT 3
- Cannot load markdown-html in react-native project
- TemplateMark Dingus does not load markdown transforms
- Rename CiceroMark to AgreementMark HOT 3
- Remove the Dingus
- Update all Concerto main repo dependencies to latest version
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 markdown-transform.