Subject: bug#23584: [25.0.94.1] paragraph forward-backward inconsistent

From: Andreas Röhler <[email-masked]>
Date: Fri, 20 May 2016 11:17:25 +0200

GNU Emacs 25.0.94.1 (i686-pc-linux-gnu, GTK+ Version 2.24.25) of 2016-05-18

Put text at end of mail in html-mode. It should consist of two lines, 
contain a newline before last line. Cursor at "href=" at last line. M-x 
backward-paragraph RET jumps to BOB. While from BOB M-x 
forward-paragraph RET would stop at BOL of last-line, i.e. before start-pos.

AFAIU cause is in sgml-mode.el

Where values of (defconst sgml-name-re "[_:[:alpha:]][-_.:[:alnum:]]*")

later on are included

   (setq-local paragraph-start (concat "[ \t]*$\\|\
[ \t]*</?\\(" sgml-name-re sgml-attrs-re "\\)?>"))
   (setq-local paragraph-separate (concat paragraph-start "$"))

;;;;;;;;

<link rel="search" type="application/opensearchdescription+xml" 
href="https://www.youtube.com/opensearch?locale=en_US" title="YouTube 
Video Search"><link rel="shortcut icon" 
href="https://s.ytimg.com/yts/img/favicon-vflz7uhzw.ico" 
type="image/x-icon">     <link rel="icon" 
href="//s.ytimg.com/yts/img/favicon_32-vfl8UGn4k.png" 
sizes="32x32"><link rel="icon" 
href="//s.ytimg.com/yts/img/favicon_48-vfl1s0rKh.png" 
sizes="48x48"><link rel="icon" 
href="//s.ytimg.com/yts/img/favicon_96-vfldSA3ca.png" 
sizes="96x96"><link rel="icon" 
href="//s.ytimg.com/yts/img/favicon_144-vflWmzoXw.png" 
sizes="144x144"><meta name="theme-color" content="#e62117">        <link 
rel="alternate" 
href="android-app://com.google.android.youtube/http/www.youtube.com/watch?v=sP933gIjwUA">
     <link rel="alternate" 
href="ios-app://544007664/vnd.youtube/www.youtube.com/watch?v=sP933gIjwUA">