Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Simplify the HTML block tag handling in the markdown formatter. (See forum thread 3f0136cd80.) Dramatically reduce the number of of HTML block tags that do not apply markdown formatting to their content. The list is now just <pre> and <script>. Formerly this list include things like <p> and <table>. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
cdbf0bf179989a2dffbaab0748112b63 |
User & Date: | drh 2021-08-06 23:23:22 |
References
2021-08-07
| ||
10:33 | Fix an uninitialized variable resulting from check-in [cdbf0bf179989a2d]. ... (check-in: a099ccfe user: drh tags: trunk) | |
Context
2021-08-06
| ||
23:39 | Minor internal doc fixes. ... (check-in: b473ba07 user: stephan tags: trunk) | |
23:23 | Simplify the HTML block tag handling in the markdown formatter. (See forum thread 3f0136cd80.) Dramatically reduce the number of of HTML block tags that do not apply markdown formatting to their content. The list is now just <pre> and <script>. Formerly this list include things like <p> and <table>. ... (check-in: cdbf0bf1 user: drh tags: trunk) | |
2021-08-05
| ||
17:06 | Minor doc fix for previous commit. No code changes. ... (check-in: 04a9e74a user: stephan tags: trunk) | |
Changes
Changes to src/markdown.c.
︙ | ︙ | |||
169 170 171 172 173 174 175 | /******************** * GLOBAL VARIABLES * ********************/ | | > > > > > < < < < < < < < < < < < < < < < < < < < < < < < | 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 | /******************** * GLOBAL VARIABLES * ********************/ /* block_tags -- recognised block tags, sorted by cmp_html_tag. ** ** When these HTML tags are separated from other text by newlines ** then they are rendered verbatim. Their content is not interpreted ** in any way. */ static const struct html_tag block_tags[] = { { "pre", 3 }, { "script", 6 }, }; /*************************** * STATIC HELPER FUNCTIONS * ***************************/ /* build_ref_id -- collapse whitespace from input text to make it a ref id */ |
︙ | ︙ | |||
1795 1796 1797 1798 1799 1800 1801 | } } /* no special case recognised */ return 0; } | | | < < | < < < < < < < < < < < < < < < < < < < < < | 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 | } } /* no special case recognised */ return 0; } /* looking for an matching closing tag */ /* followed by a blank line */ i = 1; while( i<size ){ i++; while( i<size && !(data[i-1]=='<' && data[i]=='/') ){ i++; } if( (i+2+curtag->size)>=size ) break; j = htmlblock_end(curtag, data+i-1, size-i+1); if (j) { i += j-1; found = 1; break; } } if( !found ) return 0; /* the end of the block has been found */ blob_init(&work, data, i); if( rndr->make.blockhtml ){ rndr->make.blockhtml(ob, &work, rndr->make.opaque); } |
︙ | ︙ |