Joseph Myers
7861b330cd
Special-case use of HTML tags for converting <sub> / <sup> ( #119 )
...
Allow different strings before / after `<sub>` / `<sup>` content
In particular, this allows setting `sub_symbol='<sub>'`,
`sup_symbol='<sup>'`, to use raw HTML in the output when
converting subscripts and superscripts.
2024-06-23 13:28:05 +02:00
Joseph Myers
2bd0772685
Avoid inline styles inside <code> / <pre> conversion ( #117 )
...
* Avoid inline styles inside `<code>` / `<pre>` conversion
The check used for this is analogous to that used to avoid escaping
potential markup characters inside such tags.
Fixes #103
---------
Co-authored-by: AlexVonB <AlexVonB@users.noreply.github.com >
2024-04-04 20:55:54 +02:00
Chris Papademetrious
d5fb0fbb85
make sure there are blank lines around table/figure captions ( #114 )
...
Signed-off-by: chrispy <chrispy@synopsys.com >
Co-authored-by: AlexVonB <AlexVonB@users.noreply.github.com >
2024-03-26 21:41:56 +01:00
André van Delft
2f9a42d3b8
Strip text before adding blockquote markers ( #76 )
2024-03-26 21:07:28 +01:00
Veronika Butkevich
f33ccd7c1a
Fix newline start in header tags ( #89 )
...
* Fix newline start in header tags
2024-03-26 20:46:30 +01:00
Thomas L. Kjeldsen
60967c1c95
ignore script and style content (such as css and javascript) ( #112 )
2024-03-11 21:07:24 +01:00
chrispy
2b22d239ad
avoid text normalization/escaping in any preformatted/code context
...
Signed-off-by: chrispy <chrispy@synopsys.com >
2024-01-15 10:53:14 -05:00
Adam Bambuch
17d8586843
don't escape text in pre tag (Fenced Code Blocks) ( #67 )
...
don't escape text in pre tag (Fenced Code Blocks)
2022-08-28 20:58:54 +02:00
AlexVonB
5f1b98e25d
added wrap option
...
closes #66
2022-04-24 11:00:04 +02:00
AlexVonB
35479d2d3b
Merge branch 'code_language_callback' of https://github.com/tdgroot/python-markdownify into tdgroot-code_language_callback
2022-04-13 20:25:37 +02:00
AlexVonB
423b7e948c
add option to allow inline images in selected tags
...
fixes #61
2022-04-13 19:55:34 +02:00
Timon de Groot
0ea95de4d0
Add code language callback
2022-04-09 13:22:28 +02:00
AlexVonB
cb2646cd93
differentiated between text and code language
2021-11-17 17:03:31 +01:00
AlexVonB
9692b5e714
satisfy linter
2021-11-17 16:55:00 +01:00
Umberto Grando
ac68c53a7d
added language for multiline code
2021-11-01 21:19:35 +01:00
AlexVonB
16d8a0e1f7
Revert "add figure/figcaption"
...
This reverts commit 828e116530 .
2021-07-11 13:12:16 +02:00
AlexVonB
4aa6cf2a24
rewrote text processing to not escape _ in code
...
fixes #47
2021-07-11 13:10:59 +02:00
AlexVonB
828e116530
add figure/figcaption
...
for #46
2021-06-30 13:02:42 +02:00
AlexVonB
62e9f0de02
add examples for custom converters
...
closes #46
2021-06-27 15:53:23 +02:00
AlexVonB
a6a31624ad
add options for sub and sup tags
...
fixes #44
2021-05-30 19:07:43 +02:00
AlexVonB
6f3732307d
restructured test files
2021-05-30 19:06:52 +02:00
AlexVonB
8f6d7e500d
add option 'default_title' to links
...
fixes #39
2021-05-30 18:40:40 +02:00
AlexVonB
70ef9b6e48
added pre tag
...
closes #15
2021-05-21 14:15:41 +02:00
AlexVonB
079f32f6cd
added del and s tags
2021-05-21 12:27:49 +02:00
AlexVonB
77797ebb79
Merge branch 'andrewcrichards/add_code_samp_kbd_tags' of https://github.com/AndrewCRichards/python-markdownify into AndrewCRichards-andrewcrichards/add_code_samp_kbd_tags
2021-05-21 12:11:59 +02:00
AlexVonB
ea81407b87
implemented table parsing correctly
...
instead of manually walking down the dom tree
in a table, we now rely on the main descent loop
and just implement conversion for rows and cells
correctly. this enables the use of html inside a
table cell.
2021-05-17 14:00:00 +02:00
AlexVonB
e6da15c173
allow tables with headers in first (or any) column
2021-05-17 12:36:48 +02:00
AlexVonB
7dac92e85e
Allow for tables without header row
...
fixes #42
2021-05-16 19:02:04 +02:00
Jiulong Wang
ddfbf6a364
Keep important spaces in <li> element
2021-05-10 16:07:54 -07:00
Jiulong Wang
91a64e3cd4
Fix missing whitespaces in <li> node
2021-05-10 14:42:05 -07:00
AlexVonB
73800ced36
fixed whitespace issues at nested lists
2021-05-02 13:44:09 +02:00
AlexVonB
1538cacb94
Merge branch 'develop' into ordere-list-update
2021-05-02 10:58:13 +02:00
AlexVonB
55fb96e3c0
fix hr tests
2021-05-02 10:45:52 +02:00
Jiulong Wang
5f102d5223
Add conversion for hr element
2021-04-29 13:41:28 -07:00
AlexVonB
96f7e7d307
Merge branch 'develop' into add-basic-support-for-tables
2021-04-22 12:40:16 +02:00
AlexVonB
e1dbbfad42
guard table lines with pipes, resolves the empty header problem
2021-04-22 12:36:11 +02:00
AlexVonB
b47d5f11c8
Merge pull request #37 from andredelft/develop
...
Add `strong_em_symbol` and `newline` options to the converter
2021-04-18 21:35:16 +02:00
André van Delft
29c794e17d
Introduce OPTIONs for strong_em_symbol
2021-04-18 18:13:29 +02:00
André van Delft
e877602a5e
Separate the strong_em_symbol and newline style tests
2021-04-05 11:28:42 +02:00
André van Delft
16dbc471b9
Test newline_style
2021-04-05 10:47:55 +02:00
André van Delft
8da0bdf998
Test strong_em_symbol
2021-04-05 10:28:46 +02:00
AlexVonB
f320cf87ff
closing #25 and #18
...
Adds newlines after blockquotes, allowing for paragraphs after a
blockquote.
Due to merging problems with @lucafrance 's code I had to quickly copy
and paste their code. Thanks for the contribution!
2021-02-21 20:53:44 +01:00
Bruno Miguens
de6f91af0e
Revert header validation and leave possibility to empty column
2021-02-08 20:56:18 +00:00
Bruno Miguens
8c28ade348
Remove empty header validation to allow empty header
2021-02-08 20:50:15 +00:00
Bruno Miguens
a152c5b706
Fix lint
2021-02-08 19:32:35 +00:00
Bruno Miguens
292d64bbf4
Remove unnecessary tests
2021-02-08 19:26:27 +00:00
Bruno Miguens
db96eeb785
Add tests for basic and thead/tbody tables
2021-02-08 17:00:09 +00:00
AlexVonB
77d1e99bd5
satisfy linter
2021-01-12 22:42:06 +01:00
AlexVonB
97c78ef55b
Merge branch 'fix-extra-headline-whitespace' into develop
2021-01-12 22:38:59 +01:00
AlexVonB
453b604096
Fixing autolinks
...
When checking a links href and text for
equality, first un-escape the underscores
in the text -- because six escapes them.
This should fix #29 .
2021-01-02 17:22:36 +01:00