Skip to content

Instantly share code, notes, and snippets.

View Rahulbaran's full-sized avatar
👋
Hi

Rahul Kumar Rahulbaran

👋
Hi
View GitHub Profile
@Rahulbaran
Rahulbaran / script.js
Created February 24, 2022 08:08
Script for markdown parsing
"use strict";
// * FUNCTION FOR BOLD REPLACEMENT
const boldReplacer = (match, p1, p2, p3, p4) => {
return match.startsWith("**")
? `<strong>${p2}</strong>`
: `<strong>${p4}</strong>`;
};
// * FUNCTION FOR ITALIC REPLACEMENT