From 29c1840fdc06eb98dcb6f0e0d93b374beebcd474 Mon Sep 17 00:00:00 2001 From: DeathAxe Date: Mon, 13 Sep 2021 21:33:45 +0200 Subject: [PATCH] Symbols: Improve symbol transformations + normalize leading whitespace + convert image tags ![alt-text](link] to alt-text + remove footnotes --- syntaxes/Symbol List - Heading.tmPreferences | 28 ++++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/syntaxes/Symbol List - Heading.tmPreferences b/syntaxes/Symbol List - Heading.tmPreferences index aa5e6a29..55726c24 100644 --- a/syntaxes/Symbol List - Heading.tmPreferences +++ b/syntaxes/Symbol List - Heading.tmPreferences @@ -1,32 +1,32 @@ - scope - text.html.markdown markup.heading + text.html.markdown markup.heading - meta.whitespace.newline settings showInSymbolList 1 symbolTransformation - s/\[([^]]+)\]\([^)]+\)/$1/g; - s/\[([^]]+)\]\[[^]]+\]/$1/g; - s/\[([^]]+)\]/$1/g; - s/\s*#+\s*$//g; - s/^\s*#(#*)\s*/$1/g; - s/^#{5}/ /g; - s/^#{4}/ /g; - s/^#{3}/ /g; - s/^#{2}/ /g; - s/^#{1}/ /g; - s/^(-+)\s*$/ $1/ + s/\!?\[([^]]+)\]\([^)]*\)/$1/g; # strip image or link urls + s/\[([^]]+)\]\[[^]]*\]/$1/g; # strip reference urls + s/\[\^[^]]+\]//g; # strip footnotes + s/^\s*//g; # strip leading whitespace + s/\s*#+\s*\z//g; # strip trailing hashes + s/^#{6}/ /g; # indent atx heading 6 + s/^#{5}/ /g; # indent atx heading + s/^#{4}/ /g; # indent atx heading + s/^#{3}/ /g; # indent atx heading + s/^#{2}/ /g; # indent atx heading + s/^#{1}//g; # indent atx heading showInIndexedSymbolList 1 symbolIndexTransformation - s/\s*#+\s*$//g; + s/^\s*//g; # strip leading whitespace + s/\s*#+\s*\z//g; # strip trailing hashes