diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sisu/v0/shared_sem.rb | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/sisu/v0/shared_sem.rb b/lib/sisu/v0/shared_sem.rb index da989999..0c9e485c 100644 --- a/lib/sisu/v0/shared_sem.rb +++ b/lib/sisu/v0/shared_sem.rb @@ -65,19 +65,20 @@ module SiSU_sem @para=para end def rgx + def exclude + /^<:code>/ + end def each_csc - /[a-z]+[:;]\{|\}[:;][a-z]+/ + /\b[a-z]+[:;]\{|\}[:;][a-z]+\b/ end def each_c - /[a-z]+:\{|\}:[a-z]+/ + /\b[a-z]+:\{|\}:[a-z]+\b/ end def each_sc - /[a-z]+;\{|\};[a-z]+/ + /\b[a-z]+;\{|\};[a-z]+\b/ end def pair_csc /(([a-z]+)(?::\{(.+?)\}:\2|;\{(.+?)\};\2))/ - #/(([a-z]+);\{(.+?)\};\2)/ - #/(([a-z]+)([:;])\{(.+?)\}\3\2)/ end def pair_c /(([a-z]+):\{(.+?)\}:\2)/ @@ -92,7 +93,9 @@ module SiSU_sem end def rm def sem_marker_parts - @para.gsub!(rgx.each_csc,'') + unless @para =~ rgx.exclude + @para.gsub!(rgx.each_csc,'') + end @para end def sem_marker_added_extra_parts |