mirror of
https://github.com/qdrant/landing_page.git
synced 2026-10-02 09:28:30 +02:00
Added captures to images in posts, fixed overflowing mathjax (#508)
* added captures to images in posts, fixed overflowing mathjax * fix * phrasing fix
This commit is contained in:
@@ -73,7 +73,12 @@
|
||||
</div>
|
||||
</section>
|
||||
<div class="qb-post__content">
|
||||
{{ .Content }}
|
||||
{{ $reAltTitleIn := "<img src=\"([^\"]+)\" alt=\"([^\"]*)\" title=\"([^\"]+)\">" }}
|
||||
{{ $reAltTitleOut := "<figure><img src=\"$1\" alt=\"$2\" title=\"$3\"><figcaption>$3</figcaption></figure>" }}
|
||||
{{ $contentWithImgCaptures := .Content | replaceRE $reAltTitleIn $reAltTitleOut | safeHTML }}
|
||||
|
||||
{{ $wrappedTable := printf "<div class=table-responsive> ${1} </div>" }}
|
||||
{{ $contentWithImgCaptures | replaceRE "(<table>(?:.|\n)+?</table>)" $wrappedTable | safeHTML }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user