On 1 December 2013 01:50, Shun Fukuzawa <[email protected]> wrote:

> Hi,
>
> I found a Japanese character specific bug.
>
> Japanese character "素" and terms including it at end aren't converted into
> emphasis and strong with single markup. I tested the below on utf-8.
>
> Example ("要素" means "element")
> *要素* -> NG
> *要* -> OK
> *素* -> NG
> *要素あ* -> OK
> **要素** -> OK
> **要** -> OK
> **素** -> OK
> **要素あ** -> OK
> _要素_ -> NG
> _要_ -> OK
> _素_ -> NG
> _要素あ_ -> OK
> __要素__ -> OK
> __要__ -> OK
> __素__ -> OK
> __要素あ__ -> OK
>

Hi,

This appears to be a Python 2 problem.  Unfortunately Python 2 strings are
not automatically Unicode compliant in some circumstances.  Asciidoc quoted
text is required to end in a non-whitespace character, but in the
 "素" character at the end of the quote is not being considered as a
non-whitespace by the Python regular expression engine.  I get the same
result just in the Python REPL.

Its unlikely that this will be fixed until a port to Python 3 where all
strings are Unicode by default.  In the meantime I'm afraid you will have
to use the ** and __ unconstrained quotes as a workaround.

Cheers
Lex



>
> docbook version:
> <simpara>*要素*</simpara>
> <simpara><emphasis role="strong">要</emphasis></simpara>
> <simpara>*素*</simpara>
> <simpara><emphasis role="strong">要素あ</emphasis></simpara>
> <simpara><emphasis role="strong">要素</emphasis></simpara>
> <simpara><emphasis role="strong">要</emphasis></simpara>
> <simpara><emphasis role="strong">素</emphasis></simpara>
> <simpara><emphasis role="strong">要素あ</emphasis></simpara>
> <simpara>_要素_</simpara>
> <simpara><emphasis>要</emphasis></simpara>
> <simpara>_素_</simpara>
> <simpara><emphasis>要素あ</emphasis></simpara>
> <simpara><emphasis>要素</emphasis></simpara>
> <simpara><emphasis>要</emphasis></simpara>
> <simpara><emphasis>素</emphasis></simpara>
> <simpara><emphasis>要素あ</emphasis></simpara>
>
> My environment is Asciidoc ver. 8.6.8 via macports and Python 2.7.6 on Mac.
>
> --
> You received this message because you are subscribed to the Google Groups
> "asciidoc" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/asciidoc.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"asciidoc" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/asciidoc.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to