markdown
How to center text with Markdown?
Markdown does not support this feature natively, but you can achieve this wrapping Markdown into HTML. As a rule of thumb, most ‘flavors’ of Markdown will render this as centered text: <p style=”text-align: center;”>Centered text</p> Specifically for Grav, as their documentation states, you should do these following steps: in your system configuration file user/config/system.yaml make … Read more
Jekyll & KramDown – How to Display Table Border
I was able to assign a style class to a markdown table this way. It gives a table with a black line border and border between the cells. Markdown example: In file hello-world.md | Item | Description | Price | | — | — | —: | | item1 | item1 description | 1.00 | … Read more
Rendering markdown text in Rails 3
In your Gemfile: gem ‘bluecloth’ and don’t forget to run bundle install when you need to convert markdown to html, simply use: markdown = BlueCloth.new(some_text_variable).to_html You can use it in a view: <%= markdown.html_safe %>
Github flavored Markdown and pygments highlighting in Jekyll
Edit: Easier now as of Jekyll >= 0.12.1 redcarpet2 is natively supported by Jekyll, so you can simply set your config to markdown: redcarpet and you are good to go with GFM / fenced code blocks without the rest of this mumbojumbo… Original answer You explicitly ask for Github-flavored markdown, so I presume you aren’t … Read more
How to prevent/disable automatic list number incrementing in markdown?
Experimenting revealed I can prevent this behavior by escaping the period: 1\.first 2\.second 2\.second 3\.third
Parse and traverse elements from a Markdown file
As another comment mentioned, Python-Markdown has an extension API and it happens to use xml.etree.ElementTree under the hood. You could theoretically create an extension that accesses that internal ElementTree object and do what you want with it. However, if you use raw HTML (including HTML entities) and/or the codehilite extension, you will get an incomplete … Read more