smartquotes.js icon indicating copy to clipboard operation
smartquotes.js copied to clipboard

Adding inline code and code block support

Open sunknudsen opened this issue 3 years ago • 1 comments

Everything is converted except for <code>, <script>, <style>, and <pre> tags.

In the context of markdown strings, it would be amazing if inline code and code block snippets could be ignored (considering adding smartquotes to transpile-md-to-json.

const smartquotes = require("smartquotes");
 
const text = smartquotes("# The typography \"rabbit hole\"\n\nTo enter the rabbit's home, once must first enter the rabbit hole using command `enter \"rabbit hole\"`.\n\n```javascript\nconst rabbit = \"hole\"\n```");

console.log(text)

smartquotes

Current implementation breaks code.

sunknudsen avatar Oct 06 '20 12:10 sunknudsen

Documenting other markdown edge cases here…

[![How to self-host a hardened strongSwan IKEv2/IPsec VPN server for iOS and macOS - YouTube](how-to-self-host-a-hardened-strongswan-ikev2-ipsec-vpn-server-for-ios-and-macos.png)](https://www.youtube.com/watch?v=HY3F_vHuTFQ "How to self-host a hardened strongSwan IKEv2/IPsec VPN server for iOS and macOS - YouTube")

sunknudsen avatar Oct 06 '20 12:10 sunknudsen