从 github gists 粘贴代码会在 OneNote 中插入额外的换行符。
//--------------------------------------------------
// constexpr and Constant Expressions
const int flies = 20; // OK
const int limit = flies+1; // OK
int staff_size = 27; // NOT a constant expression (no const)
const int sz = get_size(); // Not a constant expression, get_size() not known until runtime
我希望它看起来像这样:
//--------------------------------------------------
// constexpr and Constant Expressions
const int flies = 20; // OK
const int limit = flies+1; // OK
int staff_size = 27; // NOT a constant expression (no const)
const int sz = get_size(); // Not a constant expression, get_size() not known until runtime
手动删除换行符不是一种选择。我该怎么做?
答案1
解决方案之一是执行以下操作:
- 先从要点中复制代码并将其粘贴到 Microsoft Word,然后从那里复制并粘贴到 OneNote。也适用于 Visual Studio 中的代码。