At this day and age, we really shouldn’t have a space vs. tabs discussion with this argument. Especially when spaces can be used for visual indentation (which is quite popular with Python code) and tabs are discouraged
Dev Build 3119
@wbond: I ran into some rendering issues with the popups. Here are two examples.
Example 1
In this case, only the FALSE
and TRUE
should have a red background. Not everything after the FALSE
(same happens when I use span
and not code
tags).
content = """
<body id="my-plugin-feature">
<style>
code {
background-color: red;
border-radius: 3px;}
</style>
depending on whether <code>character.only</code> is <code>FALSE</code> (default) or <code>TRUE</code>).
</body>"""
view.show_popup(content)
Example 2
Maybe the same problem with the start and beginning of the background color…
content = """
<body id="my-plugin-feature">
<style>
code {
background-color: red;
border-radius: 3px;
}
</style>
<p>The default value of <code>NULL</code> corresponds to all libraries currently known to <code><a>.libPaths</a>()</code>. Non-existent library trees are silently ignored.</p>
</body>"""
view.show_popup(content)
Edit: ST 3120, Mac OS X 10.11.6
I also ran over an at least unexpected behavior regarding the sizes of phantoms to show images: If the image is defined via the file path, the phantom size does not fit the image size. On the other hand if the image is directly encoded, the phantom has the same size of the image.
Example:
Generate phantom content with the absolute image path:
image_path = ...
content = '<img src="file://{0}" />'.format(image_path)
Generate phantom content with base64 encoded images:
image_path = ...
with open(image_path, "rb") as f:
image_raw_data = f.read()
img_data = base64.b64encode(image_raw_data).decode()
content = '<img src="data:image/png;base64,{0}" />'.format(img_data)
Absolute path:
Base64 encoded images:
(I can also read the image dimensions from the image and set the width and height attributes of the img tag. Then it results in the same phantom size as Base64.)
I am using Windows with build 3120.
Ideally they can be posted at https://github.com/SublimeTextIssues/Core/issues. That way they are easier to track, exchange information on and be notified when fixed.
Is it possible to get a stickied post (in the forum main page) pointing people to the ST issues and Default Packages repositories? It might reduce the number of bug report topics showing up for syntax problems etc.