# Gatsby Chapters - Copy chapter in VS Code ## IMAGES ### A) Find the end of an image section and add a comment, works for most of the cases: <mark>FIND regex*</mark> ``` (\[\[File:[^\]]+\]\]\n\n)([\s\S]*?[Ff]igure[\s\S]*?\n)\n ``` <mark>REPLACE</mark> ``` $1$2<!-- END IMG --> \n ``` ### B) Find figures and add a start comment <mark>FIND regex*</mark> ``` (\[\[File:[^\]]+\]\]) ``` <mark>REPLACE</mark> ``` <!-- START IMG --> <!-- IMG FILE --> $1 <!-- IMG TITLE + CAPTION --> ``` - Then skip through all files and correct the rest (table images, longer captions) ## TABLES ### A) Count the tables <mark>FIND</mark> `{| class="wikitable"` ### B) Add a start comment ### C) Add an end comment <mark>FIND</mark> `|}` <mark>REPLACE</mark> ``` |} <!-- END TABLE --> ```
Gatsby Chapters
IMAGES
A) Find the end of an image section and add a comment, works for most of the cases:
FIND regex*
REPLACE
B) Find figures and add a start comment
FIND regex*
REPLACE
TABLES
A) Count the tables
FIND
{| class="wikitable"B) Add a start comment
C) Add an end comment
FIND
|}REPLACE