Comments (5)
p.s. my gem is quite rough-and-ready... but I did write a failing spec for the quoting issue... patrickdavey/vimwiki_markdown@3299639
from html-pipeline.
@patrickdavey hmmm, I don't know off the top of my head, but what is the output if you ran it directly through the github-markdown gem? I noticed your diff also bumped the gem to a specific version of github-markdown; Does the problem only appear for specific versions?
from html-pipeline.
Hi @jch , I wrote a quick spec file and pushed it up to a repo - spec itself is here:
https://github.com/patrickdavey/githubmarkuptest/blob/master/basic_spec.rb
But to summarise, The only way I could find which correctly gave me a blockquote without a <br>
in the middle was:
GitHub::Markup.render('README.markdown', markdown_string)
So.. I guess the pipeline using the HTML::Pipeline::MarkdownFilter
is using GitHub::Markdown
ultimately which is why I'm seeing the difference.
I guess this means I'd need to use Github::Markup
to generate the html from the markdown first, and then pass that into the HTML::Pipeline, which is what they say they're doing over here: https://github.com/github/markup in the README.
Assuming that's correct, please just close this issue. I guess the other thing would be to create a HTML::Pipeline::GithubFlavouredMarkupFilter
or similar? If that sounds like something which is useful let me know (and I'll try to make time!)
Thanks for the help, your gem is invaluable! 👍
Best,
Patrick
from html-pipeline.
Yip, changing the call to
github_markup = GitHub::Markup.render('README.markdown', markdown_body)
pipeline = HTML::Pipeline.new [
HTML::Pipeline::SyntaxHighlightFilter
]
result = pipeline.call(github_markup)
result[:output].to_s
works fine. Assuming that's the way I should always have been using it (quite probably I misunderstood something) please just close this issue.
from html-pipeline.
@patrickdavey nice detective work!
I guess the other thing would be to create a HTML::Pipeline::GithubFlavouredMarkupFilter or similar?
If you're looking for GitHub flavored markdown, you can pass :gfm => true
as an option to the filter:
filter = HTML::Pipeline::MarkdownFilter.new("Hi **world**!", :gfm => true)
filter.call
Closing now because you've fixed your issue, but feel free to comment further.
from html-pipeline.
Related Issues (20)
- Where is this inserting the p tag?
- Changing the list of commonmarker extensions with custom renderer is broken HOT 2
- console rendering of slash continued multi-line commands HOT 2
- Jch html-pipeline
- Add MathML elements to whitelist HOT 4
- Change branch name off of `master` HOT 1
- Invalid and missing HTML elements in the sanatizer
- V3 ideas HOT 1
- Allow picture tag in sanitation HOT 1
- Canalizacion de HTML
- Html-pipeline
- I would love to use the vscode codicon.ttf in my readme.md HOT 1
- 2.14.0 is disconnected HOT 4
- Allow `loading` attribute on images HOT 5
- Since bump 2.14.2 builds are failing HOT 3
- Allow vertical-align HOT 1
- Indicate a version for activesupport that has support/receives security patches (>= 6?) HOT 2
- v3: Question regarding requiring a ConvertFilter if there are NodeFilters HOT 1
- v3 gemoji, gemojione seem required - is there a way to not require at puma startup? HOT 2
- Suggestion: add more tags to the sanitization filter HOT 3
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 html-pipeline.