Skip to content

Commit

Permalink
fix #18, use all signs by parsing of italic markup
Browse files Browse the repository at this point in the history
  • Loading branch information
denco committed Nov 13, 2019
1 parent a6a8e41 commit 58fa2bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/markupParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@ export function parseMarkup(sourceUri: vscode.Uri, sourceText: string) {
tag = tag.replace(/\*([^\*]*)\*/g, "<strong>$1</strong>");
// line-through
if ((!html_tag) && (!tag.match('<img')) && (!listFlag)) {
tag = tag.replace(/-([\w ]*)-/g, "<span style='text-decoration: line-through;'>$1</span>");
tag = tag.replace(/_([\w ]*)_/g, "<i>$1</i>");
tag = tag.replace(/\B-([^-]*)-\B/g, " <span style='text-decoration: line-through;'>$1</span> ");
tag = tag.replace(/_([^_]*)_/g, "<i>$1</i>");
}
} else {
if (tag !== `<pre><code style='font-family: ${MONOSPACE_FONT_FAMILY}'>`) {
Expand Down

0 comments on commit 58fa2bf

Please sign in to comment.