Skip to content

Commit

Permalink
Fix loading on mac
Browse files Browse the repository at this point in the history
  • Loading branch information
exeldro committed Dec 17, 2024
1 parent 36c7fd4 commit a28d8f2
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ env:
jobs:
macos:
name: macOS
runs-on: macos-12
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ else()
cmake_minimum_required(VERSION 3.18)
endif()

project(markdown VERSION 0.2.6)
project(markdown VERSION 0.2.7)
set(PROJECT_FULL_NAME "Markdown Source")

# Set new UUIDs when you start to create a new plugin.
Expand Down
2 changes: 1 addition & 1 deletion buildspec.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,5 @@
}
},
"name": "markdown",
"version": "0.2.6"
"version": "0.2.7"
}
2 changes: 1 addition & 1 deletion cmake/ObsPluginHelpers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ if(OS_MACOS)
# Set macOS-specific C++ standard library
target_compile_options(
${CMAKE_PROJECT_NAME}
PRIVATE "$<$<COMPILE_LANG_AND_ID:OBJC,AppleClang,Clang>:-fcolor-diagnostics>" -stdlib=libc++)
PRIVATE "$<$<COMPILE_LANG_AND_ID:OBJC,AppleClang,Clang>:-fcolor-diagnostics>")

# Set build architecture to host architecture by default
if(NOT CMAKE_OSX_ARCHITECTURES)
Expand Down
10 changes: 5 additions & 5 deletions markdown.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,19 +123,19 @@ window.addEventListener('setMarkdownCss', function(event) { \n\
path = path_relative;
}
ensure_directory(path);
struct dstr url;
if (os_quick_write_utf8_file(path, md->html.array, md->html.len, false)) {
obs_data_set_string(bs, "url", path);
dstr_init_copy(&url, "file://");
dstr_cat(&url, path);
} else {
size_t len;
char *b64 = base64_encode((const unsigned char *)md->html.array, md->html.len, &len);

struct dstr url;
dstr_init_copy(&url, "data:text/html;base64,");
dstr_cat(&url, b64);
obs_data_set_string(bs, "url", url.array);
dstr_free(&url);
bfree(b64);
}
obs_data_set_string(bs, "url", url.array);
dstr_free(&url);
bfree(path);
obs_data_set_string(bs, "css", "");
}
Expand Down

0 comments on commit a28d8f2

Please sign in to comment.