Comments (2)
I think this could be a relatively straightforward change to the produce_cards
function; it might require also doing some work to make the card type configurable. I don't know that I'll have time to do this myself any time soon, but I'm not opposed to its addition if you wanted to make the changes, and would review a PR.
from ankdown.
I've come up with a solution but since I barely know any Python I really don't think it's any good, but it works! I don't know any git either so I'll just post it here for others who want a quick fix or don't know any python either. Besides that I'll try to look into the produce_cards
function and see if I can come up with a proper solution.
I've placed this at the end of the determine_media_references(self):
definition (def?)
self.fields[i] = re.sub(r'<p>', '', current_stage)
self.fields[i] = re.sub(r'</p>', '', current_stage)
self.fields[i] = re.sub(r'[%].*\n', '', current_stage)
Line 1 and 2 replace the paragraph stuff. About line 3: when I put text after the percent sign it treats that line as a field and puts it in the fields array, line 3 edits it out of the fields array by searching for the percent sign until the linebreak regardless of the contents.
As I said this is really hacky but for the moment it works.
from ankdown.
Related Issues (20)
- (Possible) Bug: Ankdown adds <p></p> to the first and second field HOT 2
- Cloze support HOT 3
- Option to change math separators HOT 4
- Configuration file
- PyYAML warnings are annoying
- Cannot import the package in Anki after running Ankdown with method A HOT 3
- README clarification
- Merge Ankidown and Ankdown HOT 2
- UnicodeDecodeError HOT 1
- Feature Request: Github flavored markdown HOT 4
- Images in Subfolders
- Reloading decks overwrites css changes HOT 1
- Order of processed markdown files seems random HOT 1
- Installation instructions failing
- Images HOT 2
- Methods of correctly preserving card identity HOT 3
- Can i create deck/card by using visual studio code with markdown plugin? HOT 2
- Image import is broken HOT 8
- Switch to MathJax or KaTeX HOT 1
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 ankdown.