flywire / caption Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU General Public License v3.0
License: GNU General Public License v3.0
The following URL is ignored:
[![Alt text](/path/to/image.png "This is the title of the image.")](URL)
Expected:
<figure>
<a href="URL">
<img alt="Alt text" src="/path/to/image.png" title="This is the title of the image."/>
</a>
<figcaption><span>Figure 1:</span> This is the title of the image.</figcaption>
</figure>
The link would include the image but not the caption.
The alt tag needs more consideration.
The Attribute Lists extension is officially supported by Python-Markdown but the style is stripped.
To define attributes on inline elements, the attribute list should be defined immediately after the inline element with no white space.
[link](http://example.com){: class="foo bar" title="Some title!" }
The above results in the following output:
<p><a href="http://example.com" class="foo bar" title="Some title!">link</a></p>
e.g.:
![Alt text](/path/to/image.png "This is the title of the image."){: style="width:300px"}
Expected:
<figure>
<img alt="Alt text" src="/path/to/image.png" style="width:300px" title="This is the title of the image." />
<figcaption>This is the title of the image.</figcaption>
</figure>
Hi there,
first of all, thanks for this! After some research, I think this extension would be what I'm looking for, but I did encounter 2 issues for my use case (also found in yafg):
I would like to do a PR for this, but I was wondering what are your plans for this project...
Allow captions on other content eg Tables.
Some of the requirements are optional. By moving them to extra's (e.g. pip install .[test]
) most projects that have caption
as dependency could be smaller:
In particular:
pytest
pytest-cov
coverage
The caption Tag is used to specify the caption of a table. This tag will be inserted just after the <table>
tag.
Markdown does not define a caption for tables. This could be done by convention, alternatively using an Officially Supported Extension, as shown below, before rendering.
Table Example with heading, two columns and a row
| Syntax | Description |
| ----------- | ----------- |
| Header | Title |
| Paragraph | Text |
<p>Table Example with heading, two columns and a row</p>
<table>
<thead>
<tr>
<th>Syntax</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>Header</td>
<td>Title</td>
</tr>
<tr>
<td>Paragraph</td>
<td>Text</td>
</tr>
</tbody>
</table>
Output
Table Example with heading, two columns and a row
Syntax | Description |
---|---|
Header | Title |
Paragraph | Text |
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.