[ovs-dev,2/3] nroff: Add support for <b>...</b> and <i>...</i> inline markup.
diff mbox

Message ID 1442509883-3992-2-git-send-email-blp@nicira.com
State Accepted
Headers show

Commit Message

Ben Pfaff Sept. 17, 2015, 5:11 p.m. UTC
Signed-off-by: Ben Pfaff <blp@nicira.com>
---
 python/build/nroff.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Justin Pettit Sept. 21, 2015, 11:07 p.m. UTC | #1
Acked-by: Justin Pettit <jpettit@nicira.com>

--Justin


> On Sep 17, 2015, at 10:11 AM, Ben Pfaff <blp@nicira.com> wrote:
> 
> Signed-off-by: Ben Pfaff <blp@nicira.com>
> ---
> python/build/nroff.py | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/python/build/nroff.py b/python/build/nroff.py
> index 04fc3e8..8b16db5 100644
> --- a/python/build/nroff.py
> +++ b/python/build/nroff.py
> @@ -66,7 +66,7 @@ def inline_xml_to_nroff(node, font, to_upper=False, newline='\n'):
>             s = text_to_nroff(node.data, font)
>         return s.replace('\n', newline)
>     elif node.nodeType == node.ELEMENT_NODE:
> -        if node.tagName in ['code', 'em', 'option', 'env']:
> +        if node.tagName in ['code', 'em', 'option', 'env', 'b']:
>             s = r'\fB'
>             for child in node.childNodes:
>                 s += inline_xml_to_nroff(child, r'\fB', to_upper, newline)
> @@ -86,7 +86,7 @@ def inline_xml_to_nroff(node, font, to_upper=False, newline='\n'):
>             else:
>                 raise error.Error("'ref' lacks required attributes: %s" % node.attributes.keys())
>             return s + font
> -        elif node.tagName == 'var' or node.tagName == 'dfn':
> +        elif node.tagName in ['var', 'dfn', 'i']:
>             s = r'\fI'
>             for child in node.childNodes:
>                 s += inline_xml_to_nroff(child, r'\fI', to_upper, newline)
> -- 
> 2.1.3
> 
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
Ben Pfaff Sept. 29, 2015, 11:57 p.m. UTC | #2
Thanks, applied to master.

On Mon, Sep 21, 2015 at 04:07:28PM -0700, Justin Pettit wrote:
> Acked-by: Justin Pettit <jpettit@nicira.com>
> 
> --Justin
> 
> 
> > On Sep 17, 2015, at 10:11 AM, Ben Pfaff <blp@nicira.com> wrote:
> > 
> > Signed-off-by: Ben Pfaff <blp@nicira.com>
> > ---
> > python/build/nroff.py | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/python/build/nroff.py b/python/build/nroff.py
> > index 04fc3e8..8b16db5 100644
> > --- a/python/build/nroff.py
> > +++ b/python/build/nroff.py
> > @@ -66,7 +66,7 @@ def inline_xml_to_nroff(node, font, to_upper=False, newline='\n'):
> >             s = text_to_nroff(node.data, font)
> >         return s.replace('\n', newline)
> >     elif node.nodeType == node.ELEMENT_NODE:
> > -        if node.tagName in ['code', 'em', 'option', 'env']:
> > +        if node.tagName in ['code', 'em', 'option', 'env', 'b']:
> >             s = r'\fB'
> >             for child in node.childNodes:
> >                 s += inline_xml_to_nroff(child, r'\fB', to_upper, newline)
> > @@ -86,7 +86,7 @@ def inline_xml_to_nroff(node, font, to_upper=False, newline='\n'):
> >             else:
> >                 raise error.Error("'ref' lacks required attributes: %s" % node.attributes.keys())
> >             return s + font
> > -        elif node.tagName == 'var' or node.tagName == 'dfn':
> > +        elif node.tagName in ['var', 'dfn', 'i']:
> >             s = r'\fI'
> >             for child in node.childNodes:
> >                 s += inline_xml_to_nroff(child, r'\fI', to_upper, newline)
> > -- 
> > 2.1.3
> > 
> > _______________________________________________
> > dev mailing list
> > dev@openvswitch.org
> > http://openvswitch.org/mailman/listinfo/dev
>

Patch
diff mbox

diff --git a/python/build/nroff.py b/python/build/nroff.py
index 04fc3e8..8b16db5 100644
--- a/python/build/nroff.py
+++ b/python/build/nroff.py
@@ -66,7 +66,7 @@  def inline_xml_to_nroff(node, font, to_upper=False, newline='\n'):
             s = text_to_nroff(node.data, font)
         return s.replace('\n', newline)
     elif node.nodeType == node.ELEMENT_NODE:
-        if node.tagName in ['code', 'em', 'option', 'env']:
+        if node.tagName in ['code', 'em', 'option', 'env', 'b']:
             s = r'\fB'
             for child in node.childNodes:
                 s += inline_xml_to_nroff(child, r'\fB', to_upper, newline)
@@ -86,7 +86,7 @@  def inline_xml_to_nroff(node, font, to_upper=False, newline='\n'):
             else:
                 raise error.Error("'ref' lacks required attributes: %s" % node.attributes.keys())
             return s + font
-        elif node.tagName == 'var' or node.tagName == 'dfn':
+        elif node.tagName in ['var', 'dfn', 'i']:
             s = r'\fI'
             for child in node.childNodes:
                 s += inline_xml_to_nroff(child, r'\fI', to_upper, newline)