vendor/bundle/ruby/2.1.0/gems/org-ruby-0.9.12/lib/org-ruby/regexp_helper.rb
######################################################################
# EMPHASIS
#
# I figure it's best to stick as closely to the elisp implementation
# as possible for emphasis. org.el defines the regular expression that
# is used to apply "emphasis" (in my terminology, inline formatting
# instead of block formatting). Here's the documentation from org.el.
#
# Terminology: In an emphasis string like " *strong word* ", we
# call the initial space PREMATCH, the final space POSTMATCH, the
# stars MARKERS, "s" and "d" are BORDER characters and "trong wor"
# is the body.  The different components in this variable specify
# what is allowed/forbidden in each part:
#
# pre          Chars allowed as prematch.  Line beginning allowed, too.
# post         Chars allowed as postmatch.  Line end will be allowed too.
# border       The chars *forbidden* as border characters.
# body-regexp  A regexp like \".\" to match a body character.  Don't use
#              non-shy groups here, and don't allow newline here.
# newline      The maximum number of newlines allowed in an emphasis exp.
EMPHASIS
I figure it's best to stick as closely to the elisp implementation
as possible for emphasis. org.el defines the regular expression that
is used to apply "emphasis" (in my terminology, inline formatting
instead of block formatting). Here's the documentation from org.el.



pre          Chars allowed as prematch.  Line beginning allowed, too.
post         Chars allowed as postmatch.  Line end will be allowed too.
border       The chars *forbidden* as border characters.
body-regexp  A regexp like \".\" to match a body character.  Don't use
non-shy groups here, and don't allow newline here.
newline      The maximum number of newlines allowed in an emphasis exp.
EMPHASIS I figure it ' s best to stick as closely to the elisp implementation as possible for emphasis . org . el defines the regular expression that is used to apply " emphasis " ( in my terminology inline formatting instead of block formatting ) . Here ' s the documentation from org . el . pre Chars allowed as prematch . Line beginning allowed too . post Chars allowed as postmatch . Line end will be allowed too . border The chars * forbidden * as border characters . body - regexp A regexp like \ " . \ " to match a body character . Don ' t use non - shy groups here and don ' t allow newline here . newline The maximum number of newlines allowed in an emphasis exp .
def build_org_link_regexp
      @org_link_regexp = /\[\[
                             ([^\]\[]+) # This is the URL
                          \](\[
                             ([^\]\[]+) # This is the friendly text
                          \])?\]/x
      @org_angle_link_text_regexp = /<(\w+:[^\]\s<>]+)>/
      @org_image_file_regexp = /\.(gif|jpe?g|p(?:bm|gm|n[gm]|pm)|svg|tiff?|x[bp]m)/i
    end
def build_org_link_regexp @org_link_regexp = / \[ \[ 
                             ([^ \] \[ ]+) # This is the URL
                           \] ( \[ 
                             ([^ \] \[ ]+) # This is the friendly text
                           \] )? \] /x @org_angle_link_text_regexp = / <( \w +:[^ \] \s <>]+)> / @org_image_file_regexp = / \. (gif|jpe?g|p(?:bm|gm|n[gm]|pm)|svg|tiff?|x[bp]m) /i end
EMPHASIS
I figure it's best to stick as closely to the elisp implementation
as possible for emphasis.
EMPHASIS I figure it ' s best to stick as closely to the elisp implementation as possible for emphasis .