-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Formatted code using EditorConfig #508
Conversation
</xsl:text> | ||
</xsl:text> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Presumably this is not the same as before. The old code inserts a newline and no spaces. The new code inserts a newline and some spaces.
I tried the test suite and it passes. Are these additional spaces harmless?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. It seems harmless, but the intention is to only insert a newline, so we should fix this. Maybe we could add a xml:space="preserve"
on the xsl:text
if EditorConfig respects that. Alternatively we could say <xsl:text>
</xsl:text>
or <xsl:value-of select="'\n'"/>
or similar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
newline issue here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a
xml:space="preserve"
on thexsl:text
if EditorConfig respects that
I doubt EditorConfig is that smart :-)
Alternatively we could say
<xsl:text>
</xsl:text>
That seems like the most straight forward solution
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looks good, except for the comment about the additional spaces after the newline inside xsl:text
@@ -44,7 +44,7 @@ | |||
public static void main(String[] args) { | |||
... | |||
} | |||
</code></p> | |||
</code></p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same newline issue here, we could maybe try either xml:space="preserve"
on the <code>
or }
</code>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
newline issue here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added "newline issue here" to lines where I could spot a newline issue similar to the one @egli pointed out.
@@ -510,7 +510,7 @@ | |||
public static void main(String[] args) { | |||
... | |||
} | |||
</code></p> | |||
</code></p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
newline issue here
</xsl:text> | ||
</xsl:text> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
newline issue here
@@ -54,23 +54,23 @@ | |||
</xsl:if> | |||
</head> | |||
<xsl:text> | |||
</xsl:text> | |||
</xsl:text> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
newline issue here
</html> | ||
<xsl:text> | ||
</xsl:text> | ||
</xsl:text> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
newline issue here
</body> | ||
<xsl:text> | ||
</xsl:text> | ||
</xsl:text> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
newline issue here
<xsl:apply-templates select="$body/*"/> | ||
<xsl:text> | ||
</xsl:text> | ||
</xsl:text> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
newline issue here
<body> | ||
<xsl:apply-templates select="$body/(@* except @xml:base)"/> | ||
<xsl:if test="$body[self::header]"> | ||
<xsl:attribute name="epub:type" select="string-join(('frontmatter','titlepage',tokenize($body/@epub:type,'\s+')),' ')"/> | ||
</xsl:if> | ||
<xsl:text> | ||
</xsl:text> | ||
</xsl:text> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
newline issue here
@@ -44,7 +44,7 @@ | |||
public static void main(String[] args) { | |||
... | |||
} | |||
</code></p> | |||
</code></p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
newline issue here
@@ -563,7 +563,7 @@ | |||
public static void main(String[] args) { | |||
... | |||
} | |||
</code></p> | |||
</code></p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
newline issue here
merged into |
Follow-up from #507.