mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-23 20:14:05 +00:00
DSL: properly handle [m] tag
In short, [m] = [m0].
This commit is contained in:
parent
80b462b0fa
commit
f0a122e740
|
@ -348,6 +348,11 @@ div.xdxf
|
|||
color: green;
|
||||
}
|
||||
|
||||
.dsl_m, .dsl_m0
|
||||
{
|
||||
padding-left: 0px;
|
||||
}
|
||||
|
||||
.dsl_m1
|
||||
{
|
||||
padding-left: 9px;
|
||||
|
|
3
dsl.cc
3
dsl.cc
|
@ -739,6 +739,9 @@ string DslDictionary::nodeToHtml( ArticleDom::Node const & node )
|
|||
result += "<div class=\"dsl_opt\" id=\"" + id + "\">" + processNodeChildren( node ) + "</div>";
|
||||
}
|
||||
else
|
||||
if ( node.tagName == GD_NATIVE_TO_WS( L"m" ) )
|
||||
result += "<div class=\"dsl_m\">" + processNodeChildren( node ) + "</span>";
|
||||
else
|
||||
if ( node.tagName.size() == 2 && node.tagName[ 0 ] == L'm' &&
|
||||
iswdigit( node.tagName[ 1 ] ) )
|
||||
result += "<div class=\"dsl_" + Utf8::encode( node.tagName ) + "\">" + processNodeChildren( node ) + "</div>";
|
||||
|
|
|
@ -224,9 +224,10 @@ ArticleDom::ArticleDom( wstring const & str ):
|
|||
|
||||
if ( !isClosing )
|
||||
{
|
||||
if ( name.size() == 2 && name[ 0 ] == L'm' && iswdigit( name[ 1 ] ) )
|
||||
if ( name == GD_NATIVE_TO_WS( L"m" ) ||
|
||||
( name.size() == 2 && name[ 0 ] == L'm' && iswdigit( name[ 1 ] ) ) )
|
||||
{
|
||||
// Opening an 'mX' tag closes any previous 'm' tag
|
||||
// Opening an 'mX' or 'm' tag closes any previous 'm' tag
|
||||
closeTag( GD_NATIVE_TO_WS( L"m" ), stack, false );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue