There are two things that needs to be changed in order for a resource pack with OptiFine functionality to work in 1.13. If you are still going to play in 1.12, I recommend that you create a backup of your resource pack so you don't have to make these adjustments every time you switch versions.

Folder merge

The mcpatcher folder is no longer used in 1.13 and all of its contents should be moved to the optifine folder. If you don't have a optifine folder in your resource pack, just rename the mcpatcher folder to "optifine".

Wrong:

\assets\minecraft\mcpatcher\ctm\

Correct:

\assets\minecraft\optifine\ctm\

The Flattening

Item/block IDs are no longer numerical and must use the new IDs that were introduced in 1.13. Note that stone_slab‌ will be renamed to smooth_stone_slab‌ in 1.14.

Any additions and changes are bold.

stoneslab_bottom.properties:

matchBlocks=stone_slab
method=ctm_compact
tiles=104-108
connect=tile
faces=bottom
metadata=0 8

stoneslab_side.properties:

matchBlocks=stone_slab
method=horizontal
tiles=100-103
connect=tile
faces=sides
metadata=0 8

stoneslab_top.properties:

matchBlocks=stone_slab
method=ctm_compact
tiles=104-108
connect=tile
faces=top
metadata=0 8