Escaping < characters in Google Docs

104 views
Skip to first unread message

evbacher

unread,
Apr 28, 2018, 12:42:48 PM4/28/18
to gd2md-html
I am considering escaping < characters when converting Google Docs to Markdown or HTML. This will eliminate the problem of <text within angle brackets> disappearing because web browsers render them as HTML tags. Note that GD2md-html already escapes < characters in HTML code blocks.

However, it will also eliminate the possibility of embedding any HTML in a Google Doc. I consider that to be somewhat of a hack, but are people doing it?

evbacher

unread,
May 31, 2018, 11:26:25 AM5/31/18
to gd2md-html
GD2md-html now replaces < characters in text with &lt; by default. However, there is an option to allow HTML tags that will preserve < as-is. You can also use the default setting and escape an < like this: \<tag>some text\</tag>. See https://github.com/evbacher/gd2md-html/wiki#options for details.

evbacher

unread,
Aug 29, 2018, 12:05:51 AM8/29/18
to gd2md-html
Note: This change has been rolled back as it was not working properly. To be revisited!
Reply all
Reply to author
Forward
0 new messages